You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make a command that has a delay, and also cancels commands when they are delayed, instead of queueing them. I'm using a specific bucket with the commands to try and do this, but I can't figure out how to do both at the same time. I've checked through the docs and the examples and can't find anything helpful.
The current bucket code I have is .bucket("test", |b| b.delay(10) .limit_for(serenity::framework::standard::buckets::LimitedFor::Guild) .limit(1).time_span(10) .delay_action(on_cooldown) .await_ratelimits(0)).await;
Which doesn't call on_cooldown. If i change await_ratelimits to 1, it does call on_cooldown, but then it automatically queues the command and runs it when the delay is up. Am I missing something? Is there a way to do both of these? If not with buckets, is there another way?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to make a command that has a delay, and also cancels commands when they are delayed, instead of queueing them. I'm using a specific bucket with the commands to try and do this, but I can't figure out how to do both at the same time. I've checked through the docs and the examples and can't find anything helpful.
The current bucket code I have is
.bucket("test", |b| b.delay(10) .limit_for(serenity::framework::standard::buckets::LimitedFor::Guild) .limit(1).time_span(10) .delay_action(on_cooldown) .await_ratelimits(0)).await;
Which doesn't call
on_cooldown
. If i changeawait_ratelimits
to 1, it does callon_cooldown
, but then it automatically queues the command and runs it when the delay is up. Am I missing something? Is there a way to do both of these? If not with buckets, is there another way?Beta Was this translation helpful? Give feedback.
All reactions