Handling of over 2k characters leaderboard

This commit is contained in:
Twentysix 2016-03-29 16:07:39 +02:00
parent 4be9757404
commit 7b04dac317

View File

@ -140,7 +140,10 @@ class Economy:
highscore += str(id[1]["balance"]) + "\n" highscore += str(id[1]["balance"]) + "\n"
place += 1 place += 1
if highscore: if highscore:
await self.bot.say("```py\n"+highscore+"```") if len(highscore) < 1985:
await self.bot.say("```py\n"+highscore+"```")
else:
await self.bot.say("The leaderboard is too big to be displayed. Try with a lower <top> parameter.")
else: else:
await self.bot.say("There are no accounts in the bank.") await self.bot.say("There are no accounts in the bank.")