Skip to content
Discussion options

You must be logged in to vote

app_commands cooldowns are implemented differently to ext.commands, so currently there isn't a way to offer a reset_cooldown method.

However, if VoteError is raised from a check, you can take advantage of the order checks are called so you don't need to reset it manually.

@app_commands.checks.cooldown(1, 10) # Called last
@ensure_user_voted_for_bot() # Your own check
async def command(interaction: discord.Interaction):
    ...

Here, the cooldown will only apply if the first check passes.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@NavisGames
Comment options

Answer selected by NavisGames
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants