Owners can bypass cooldowns with non persistent toggle (#4440)

* dev bypas cooldowns

* Toggleable within dev, new attrib

* Reuqested changes

* Remake content

* Looks like `reset_cooldown()` is under Command object :)

* Remove `await`

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
Jamie
2020-12-23 19:25:32 +00:00
committed by GitHub
parent 300346dcd4
commit d01bca2314
3 changed files with 21 additions and 0 deletions

View File

@@ -369,3 +369,18 @@ class Dev(commands.Cog):
await asyncio.sleep(2)
ctx.message.author = old_author
ctx.message.content = old_content
@commands.command()
@checks.is_owner()
async def bypasscooldowns(self, ctx, toggle: Optional[bool] = None):
"""Give bot owners the ability to bypass cooldowns.
Does not persist through restarts."""
if toggle is None:
toggle = not ctx.bot._bypass_cooldowns
ctx.bot._bypass_cooldowns = toggle
if toggle:
await ctx.send(_("Bot owners will now bypass all commands with cooldowns."))
else:
await ctx.send(_("Bot owners will no longer bypass all commands with cooldowns."))