Reset Cooldown Doesn't Work
LextYi opened this issue · comments
I try to use slash_core.BaseSlashCommand.reset_cooldown(inter)
to reset the cooldown.
But it shows this error: reset_cooldown() missing 1 required positional argument: 'inter'
Then I try this: slash_core.BaseSlashCommand.reset_cooldown(self, inter)
But it still shows the error: 'SlashCommand' object has no attribute '_buckets'
You can't use slash_core.BaseSlashCommand.reset_cooldown(inter)
, it's not a static method. It's a method of slash command. You need to create an instance of slash command (which can be retrieved using an interaction) and use reset_cooldown on it.
So, you'd end up with something like this:
inter.slash_command.reset_cooldown(inter)
This isn't a bug - this is just how python works and as such should be closed.
I think we can close this issue after our discussion on the discord server