#Responding to values changing in cooldown

1 messages · Page 1 of 1 (latest)

outer cloak
#

I have tried to use dynamic_cooldown suggested by one of the helpers and tried numerous ways, the on_message trying to get the message hopefully trying to make sure the values are being returned and no luck

I was also told to make the command a listener and make the changes that way, the listener would listen for the values changing and then change the cooldown values to the value given (but I was not sure how to do it)

#

I've also seen update_rate_limit on the normal cooldown, but once again I had no idea how to use it exactly and what type of variables etc I need to use in there

outer cloak
#

Hmmm is this a complicated feature? Or is this not even implemented?

glass knoll
#

ok done

#
def get_cooldown(ctx):
  if ctx.author.id == 012795812122:
     return commands.Cooldown(1, 10)

@bot.slash_command(name="test")
@commans.dynamic_cooldown(get_cooldown, commands.BucketTYoe.default)
async def func_name(ctx):
  do random stuff```
#

i believe this should work

#

from what i read in the docs

#

just fix it to how you need it

outer cloak
#

i did try that however it didn't work??

#

I'll try it once again

glass knoll
#

huh thats weird

#

ig i can try it real quick myself

outer cloak
#

also does the def message need to be before the command message?

glass knoll
glass knoll
#

Soo did it work?

outer cloak
#

sorry I'll try, was away for dinner

outer cloak
glass knoll
outer cloak
#

just copy pasted the code you sent no effect

glass knoll
#

Uh it was working for me 🤔

#

Well I’m at work rn I’ll check it out when home

outer cloak
#

so for some reason

#

this doesn't get collected by the bot

#

so I presume since bc of that, the command thing for dynamic is returned as false and therefore bypassed

glass knoll
#

Then using the ctx you can get the attributes

#

Cause it might be context or message I forgot

outer cloak
ancient monolith
ancient monolith
#

If it doesn’t work, then open an issue on github