From 18614b16045847543c08a69e366f93ef331d3dd0 Mon Sep 17 00:00:00 2001 From: Michael Oliveira <34169552+Flame442@users.noreply.github.com> Date: Mon, 23 Dec 2024 21:04:11 -0500 Subject: [PATCH] Respect `[p]bypasscooldowns` in `[p]slash sync` (#6465) --- redbot/core/core_commands.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index 42aab5221..521009060 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -2375,6 +2375,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): """Custom cooldown error message.""" if not isinstance(error, commands.CommandOnCooldown): return await ctx.bot.on_command_error(ctx, error, unhandled_by_cog=True) + if ctx.bot._bypass_cooldowns and ctx.author.id in ctx.bot.owner_ids: + ctx.command.reset_cooldown(ctx) + new_ctx = await ctx.bot.get_context(ctx.message) + await ctx.bot.invoke(new_ctx) + return await ctx.send( _( "You seem to be attempting to sync after recently syncing. Discord does not like it "