mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 01:12:33 -05:00
Handle inability do delete others' messages (#1111)
This commit is contained in:
@@ -109,5 +109,10 @@ class RedContext(commands.Context):
|
|||||||
await query.delete()
|
await query.delete()
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
await self.channel.delete_messages((query, resp))
|
try:
|
||||||
|
await self.channel.delete_messages((query, resp))
|
||||||
|
except discord.HTTPException:
|
||||||
|
# In case the bot can't delete other users' messages,
|
||||||
|
# or is not a bot account
|
||||||
|
await query.delete()
|
||||||
return ret
|
return ret
|
||||||
|
|||||||
Reference in New Issue
Block a user