cooldown is not applied on .sub_command()
See original GitHub issueSummary
Сommand.cooldown() does not change the cooldown for specific slash commands
Reproduction Steps
- Create any slash command with command.cooldown()
- Create a sub command with any cooldown
- Run code
Minimal Reproducible Code
@commands.slash_command()
@commands.cooldown(1, 100)
async def parent(self, inter):...
@parent.sub_command()
async def sub_without_cooldown(self, inter):
# something...
@parent.sub_command()
@commands.cooldown(1, 150)
async def sub_example(self, inter):
# something...
Expected Results
Sub_without_cooldown command and other sub commands will have cooldown specified in parent. Sub_example will have another cooldown
Actual Results
Sub_example has the same cooldown as parent
Intents
all
System Information
Disnake: 2.5.0a Python 3.10.1 Windows 10
Checklist
- I have searched the open issues for duplicates.
- I have shown the entire traceback, if possible.
- I have removed my token from display, if visible.
Additional Context
I also tried to use dynamic_cooldown but it also doesn’t work with subcommands
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Discord.js | Command Cooldown is set but not working
Inside of your message.js , you probably confused command with the exported command object (from help.js for example).
Read more >Command | Eris 0.17.1 - Abal.moe
An array of channel IDs representing channels that are not affected by cooldowns. Number of times to return a message when the command...
Read more >discord.commands.core - Pycord v2.3 Documentation
If this is ``0.0`` then the command isn't on cooldown. """ if self._buckets.valid: bucket = self._buckets.get_bucket(ctx) current = utcnow().timestamp() ...
Read more >API Reference - nextcord
Adds a Command into the internal list of commands. This is usually not called, instead the command() or group() shortcut decorators are used...
Read more >Interactions API Reference - discord.py - Read the Docs
A dictionary that can be used to store extraneous data for use during interaction processing. The library will not touch any values or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You are very welcome! Please close the issue if your problem has been solved 😃
Thank you very much!