Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Cog/command predicates #97

Open
khionu opened this issue May 14, 2020 · 2 comments
Open

Cog/command predicates #97

khionu opened this issue May 14, 2020 · 2 comments

Comments

@khionu
Copy link

khionu commented May 14, 2020

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.

@cronokirby
Copy link
Owner

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

@khionu
Copy link
Author

khionu commented May 15, 2020

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants