From 7b04dac3170e6c74da279ab709eeadb2612dfbd7 Mon Sep 17 00:00:00 2001 From: Twentysix Date: Tue, 29 Mar 2016 16:07:39 +0200 Subject: [PATCH] Handling of over 2k characters leaderboard --- cogs/economy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cogs/economy.py b/cogs/economy.py index 2180a5d24..042007910 100644 --- a/cogs/economy.py +++ b/cogs/economy.py @@ -140,7 +140,10 @@ class Economy: highscore += str(id[1]["balance"]) + "\n" place += 1 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 parameter.") else: await self.bot.say("There are no accounts in the bank.")