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

This commit is contained in:
PredaaA
2019-02-03 23:32:45 +01:00
committed by Toby Harradine
parent 655b5a96ba
commit 93ea773b7c

View File

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