mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -05:00
Handle inability do delete others' messages (#1111)
This commit is contained in:
parent
2c96844209
commit
09ed5e67a6
@ -109,5 +109,10 @@ class RedContext(commands.Context):
|
||||
await query.delete()
|
||||
break
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user