Add a 2 minute cooldown to the topic command#880
Conversation
|
I'm not a fan of this solution. I think there are relevant reasons to use two topic commands in a five minutes span. I'd propose one of the following:
|
Bluenix2
left a comment
There was a problem hiding this comment.
I don't really have much else to comment, looks good otherwise.
| Allows the refresh of a topic by pressing an emoji. | ||
| """ | ||
| message = await ctx.send(embed=self._build_topic_embed(ctx.channel.id)) | ||
| self.bot.loop.create_task(self._listen_for_refresh(message)) |
There was a problem hiding this comment.
Isn't the command itself a task?
There was a problem hiding this comment.
My reasoning for adding this as a task onto the loop, rather than awaiting it directly was so that the refresh loop isn't considered as part of the command invocation directly, this mostly matters for things like timing how long a command takes to complete,
d3ee3df to
1bd844f
Compare
Bluenix2
left a comment
There was a problem hiding this comment.
I would perhaps advocate for a 3 minute cooldown. The cooldown still does its job but we limit the "false positives" (as in, times where the cooldown prohibits usage we want to support).
Either way, it works!
Using the command while it's on cooldown will hit the error handler, which sends an error message showing how long is left on the cooldown, which is deleted after 7.5 seconds.
This is done via an emoji as buttons are too big Co-authored-by: Bluenix <bluenixdev@gmail.com>
1bd844f to
515c639
Compare
Relevant Issues
Closes #868
Description
Using the command while it's on cooldown will hit the error handler, which sends an error message showing how long is left on the cooldown, which is deleted after 7.5 seconds.

Did you: