From 44333ae53b6692ab34b4fe967ecbf4f215e7fb0e Mon Sep 17 00:00:00 2001 From: Numerlor <25886452+Numerlor@users.noreply.github.com> Date: Thu, 9 Apr 2020 15:20:02 +0200 Subject: Move message deletion up. --- bot/cogs/help_channels.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 52af03d27..8dca2ede0 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -210,11 +210,12 @@ class HelpChannels(Scheduler, commands.Cog): log.trace("dormant command invoked; checking if the channel is in-use.") if ctx.channel.category == self.in_use_category: if await self.dormant_check(ctx): - self.cancel_task(ctx.channel.id) - await self.move_to_dormant(ctx.channel) with suppress(discord.errors.NotFound): - await ctx.message.delete() log.trace("Deleting dormant invokation message.") + await ctx.message.delete() + + self.cancel_task(ctx.channel.id) + await self.move_to_dormant(ctx.channel) await self.reset_claimant_send_permission(ctx.channel) else: log.debug(f"{ctx.author} invoked command 'dormant' outside an in-use help channel") -- cgit v1.2.3