cronokirby/alchemy

Cog/command predicates

Opened this issue · 2 comments

I would like to have the same functionality as in Discord.Py, where you can create a condition that is evaluated before the command arguments are parsed. This should be usable to add checks for the whole Cog and for individual commands.

So this condition would have access to the message, I assume. Anything else? (not familiar with how discord.py) works. It could work similar to how Cogs.set_parser works atm. You could do Cogs.cond or something like that

Message and possibly user's configuration. To cover all use cases, you need to be able to obtain all contextual information (Channel/Guild/User), which includes any settings that were set by the bot's user that might affect availability of a given command.