[Core cmds] [p]servers: handle message deletion (#2400)

This commit is contained in:
PredaaA 2019-02-03 23:32:45 +01:00 committed by Twentysix
parent 01ebf2835b
commit 6d22c8faa5

View File

@ -500,7 +500,10 @@ class Core(commands.Cog, CoreLogic):
try:
await self.bot.wait_for("message", check=pred, timeout=15)
except asyncio.TimeoutError:
await query.delete()
try:
await query.delete()
except discord.errors.NotFound:
pass
else:
await self.leave_confirmation(guilds[pred.result], ctx)