mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 01:12:33 -05:00
Don't send message about DMing ACL when command's called from DM (#4188)
* Only send a message telling the user the file will be send via DM if the original message didn't come from a DM * Remove unused import for AsyncIter * Changed channel instance comparison to discord.DMChannel Co-authored-by: douglas-cpp <douglasc.dev@gmail.com>
This commit is contained in:
@@ -282,6 +282,7 @@ class Permissions(commands.Cog):
|
|||||||
except discord.Forbidden:
|
except discord.Forbidden:
|
||||||
await ctx.send(_("I'm not allowed to DM you."))
|
await ctx.send(_("I'm not allowed to DM you."))
|
||||||
else:
|
else:
|
||||||
|
if not isinstance(ctx.channel, discord.DMChannel):
|
||||||
await ctx.send(_("I've just sent the file to you via DM."))
|
await ctx.send(_("I've just sent the file to you via DM."))
|
||||||
finally:
|
finally:
|
||||||
file.close()
|
file.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user