bot icon indicating copy to clipboard operation
bot copied to clipboard

Apply pydis_core.utils.cooldown.block_duplicate_invocations decorator to commands where repeated invocations in a short time are redundant

Open Numerlor opened this issue 2 years ago • 2 comments

The block_duplicate_invocations decorator prevents commands from running in a single channel if they were used previously recently with the same arguments. This can be applied to commands like resources or docs that are often used with responses to prevent being unnecessarily invoked multiple times.

It should also be able to replace the similar functionality in the tags cog using the args_preprocessor in the decorator.

Numerlor avatar Jan 22 '23 21:01 Numerlor

This sounds sensible, are you interested in opening a PR @Numerlor?

wookie184 avatar Feb 19 '23 16:02 wookie184

Sure, but I'm currently a bit busy so if anyone else is interested they're free to do so.

On 02/19/2023 5:07 PM CET wookie184 @.***> wrote:

This sounds sensible, are you interested in opening a PR @Numerlor https://github.com/Numerlor?

— Reply to this email directly, view it on GitHub https://github.com/python-discord/bot/issues/2385#issuecomment-1436027007, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFP55DKX4YTH7JTS42O6HLWYJAKPANCNFSM6AAAAAAUDGLINM. You are receiving this because you were mentioned.Message ID: @.***>

Numerlor avatar Feb 19 '23 16:02 Numerlor