From fcb9b40b4359901cd87e6fe61fff3a75f1ee99ff Mon Sep 17 00:00:00 2001 From: Kowlin Date: Thu, 10 May 2018 23:10:42 +0200 Subject: [PATCH] [V3] Fixed [p]servers bug (#1617) * Fixed servers bug * Added protections against going negative --- redbot/core/core_commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index d1d335d10..68098ae17 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -298,7 +298,9 @@ class Core: await ctx.send("I guess not.") break try: - msg = int(msg.content) + msg = int(msg.content) - 1 + if msg < 0: + break await self.leave_confirmation(guilds[msg], owner, ctx) break except (IndexError, ValueError, AttributeError):