mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
parent
c737785114
commit
80d68684fb
@ -118,8 +118,9 @@ class RedContext(commands.Context):
|
|||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
await self.channel.delete_messages((query, resp))
|
await self.channel.delete_messages((query, resp))
|
||||||
except discord.HTTPException:
|
except (discord.HTTPException, AttributeError):
|
||||||
# In case the bot can't delete other users' messages,
|
# In case the bot can't delete other users' messages,
|
||||||
# or is not a bot account
|
# or is not a bot account
|
||||||
|
# or chanel is a DM
|
||||||
await query.delete()
|
await query.delete()
|
||||||
return ret
|
return ret
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user