mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
[Mod] Move deletedelay to core (#3638)
* Move deletedelay to core * line lengths * address review * move settings change * fine...
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user