[V3] Fixed [p]servers bug (#1617)

* Fixed servers bug

* Added protections against going negative
This commit is contained in:
Kowlin 2018-05-10 23:10:42 +02:00 committed by palmtree5
parent 7a6884e4b1
commit fcb9b40b43

View File

@ -298,7 +298,9 @@ class Core:
await ctx.send("I guess not.") await ctx.send("I guess not.")
break break
try: try:
msg = int(msg.content) msg = int(msg.content) - 1
if msg < 0:
break
await self.leave_confirmation(guilds[msg], owner, ctx) await self.leave_confirmation(guilds[msg], owner, ctx)
break break
except (IndexError, ValueError, AttributeError): except (IndexError, ValueError, AttributeError):