mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 02:16:09 -05:00
[Mod] Fix modset deletedelay (#2943)
* [Mod] Fix modset deletedelay fixes #2942 * Style guide fix
This commit is contained in:
@@ -21,10 +21,12 @@ class MoveToCore(MixinMeta):
|
||||
async def on_command_completion(self, ctx: commands.Context):
|
||||
await self._delete_delay(ctx)
|
||||
|
||||
# noinspection PyUnusedLocal
|
||||
@commands.Cog.listener()
|
||||
async def on_command_error(self, ctx: commands.Context, error):
|
||||
await self._delete_delay(ctx)
|
||||
async def on_command_error(self, ctx: commands.Context, error: Exception):
|
||||
# Every message which isn't a command but which
|
||||
# starts with a bot prefix is dispatched as a command error
|
||||
if not isinstance(error, commands.CommandNotFound):
|
||||
await self._delete_delay(ctx)
|
||||
|
||||
async def _delete_delay(self, ctx: commands.Context):
|
||||
"""Currently used for:
|
||||
|
||||
Reference in New Issue
Block a user