[Mod] Move deletedelay to core (#3638)

* Move deletedelay to core

* line lengths

* address review

* move settings change

* fine...
This commit is contained in:
TrustyJAID
2020-03-21 11:39:58 -06:00
committed by GitHub
parent d957e44e1e
commit b9f07e8684
6 changed files with 84 additions and 84 deletions

View File

@@ -134,6 +134,10 @@ def init_events(bot, cli_flags):
if outdated_red_message:
await bot.send_to_owners(outdated_red_message)
@bot.event
async def on_command_completion(ctx: commands.Context):
await bot._delete_delay(ctx)
@bot.event
async def on_command_error(ctx, error, unhandled_by_cog=False):
@@ -144,6 +148,8 @@ def init_events(bot, cli_flags):
if ctx.cog:
if commands.Cog._get_overridden_method(ctx.cog.cog_command_error) is not None:
return
if not isinstance(error, commands.CommandNotFound):
await bot._delete_delay(ctx)
if isinstance(error, commands.MissingRequiredArgument):
await ctx.send_help()