mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Downloader] Suppress NotFound errors in [p]cog update command (#5109)
* [Downloader] Suppress NotFound errors when cog update message is deleted * occurance 2
This commit is contained in:
parent
f05debc923
commit
d15011e2c5
@ -1652,11 +1652,13 @@ class Downloader(commands.Cog):
|
|||||||
try:
|
try:
|
||||||
await ctx.bot.wait_for(event, check=pred, timeout=30)
|
await ctx.bot.wait_for(event, check=pred, timeout=30)
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
|
with contextlib.suppress(discord.NotFound):
|
||||||
await query.delete()
|
await query.delete()
|
||||||
return
|
return
|
||||||
|
|
||||||
if not pred.result:
|
if not pred.result:
|
||||||
if can_react:
|
if can_react:
|
||||||
|
with contextlib.suppress(discord.NotFound):
|
||||||
await query.delete()
|
await query.delete()
|
||||||
else:
|
else:
|
||||||
await ctx.send(_("OK then."))
|
await ctx.send(_("OK then."))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user