diff options
author | 2022-04-21 19:09:34 +0100 | |
---|---|---|
committer | 2022-04-21 19:09:34 +0100 | |
commit | c429b3d24aa737fdece5fd7ae3a1c2aac2051c2e (patch) | |
tree | 0c2eea37184a34467b3c39b72d3aa27c752dc780 | |
parent | Merge pull request #2140 from python-discord/remove-wait_for-kwarg (diff) | |
parent | Merge branch 'main' into supress-notfound-when-cleaning (diff) |
Merge pull request #2142 from python-discord/supress-notfound-when-cleaning
Deal with the clean invoke being delete before replying
-rw-r--r-- | bot/exts/moderation/clean.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/exts/moderation/clean.py b/bot/exts/moderation/clean.py index 32e485996..0f14f515e 100644 --- a/bot/exts/moderation/clean.py +++ b/bot/exts/moderation/clean.py @@ -441,7 +441,10 @@ class Clean(Cog): f"A log of the deleted messages can be found here {log_url}." ) if log_url and is_mod_channel(ctx.channel): - await ctx.reply(success_message) + try: + await ctx.reply(success_message) + except errors.NotFound: + await ctx.send(success_message) elif log_url: if mods := self.bot.get_channel(Channels.mods): await mods.send(f"{ctx.author.mention} {success_message}") |