python-discord/bot-core

Provide command decorator for blocking duplicated command output

Numerlor opened this issue · 4 comments

In certain situations, multiple users invoking the same command with static output is common, resulting in duplicate messages from the bot, for example linking the same doc page.

The bot currently handles a per channel cooldown on tags, but commands always run.
I propose adding a decorator that can be applied to static output commands (e.g. doc, rules etc.) which will cause a cooldown to be applied depending on the command arguments, or maybe some output method that returns equal objects for equal output.

I'd like to pick this up, but I think I'd make more sense in bot-core now

@Numerlor I've assigned you and transferred it to bot-core.

Where would we want this? A messages module under utils? I'll also need to port over command_wraps, that'll probably best be under a function module like it's now in bot

If the implementation is closely tied to discord.py commands extension then maybe it should be in botcore.utils.command module (I think singular tense is more appropriate).