From 6efa789c85d404c0a5b6fdf3a763f5fd245f0c24 Mon Sep 17 00:00:00 2001 From: ElectricSteve <96793824+electricsteve@users.noreply.github.com> Date: Sun, 15 Feb 2026 22:56:48 +0100 Subject: [PATCH] fix: bot top (crash) with too big number hopefully fix an issue where the bot would not respond when the top num is too big. --- bot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 09eae23..f39e1f7 100644 --- a/bot.py +++ b/bot.py @@ -399,6 +399,9 @@ async def top(ctx, num: int = 10): Show top users in the server """ if await is_command_channel(ctx): + MAX_NUM = 100 + if num > MAX_NUM: + return # Send a temporary embed while data is being generated loading_embed = discord.Embed( title="Generating Leaderboard...", @@ -668,4 +671,4 @@ def check(reaction, user): try: bot.run(os.getenv('TOKEN')) except Exception as e: - print(f"Error: {e}") \ No newline at end of file + print(f"Error: {e}")