Repository navigation
Conversation
2f43ebf to
473d2c7
Compare
9a943ac to
c946378
Compare
c946378 to
3db7cb2
Compare
2c368d0 to
9670279
Compare
5befef8 to
72a6d57
Compare
72a6d57 to
f1988c6
Compare
f1988c6 to
f02b765
Compare
|
Something I'm wondering is whether these two keys are really enough metadata. One common case is text-based commands - you could argue that any cog that has those can take advantage of the Message Content Intent so does that mean the cog should list that intent as optional? I don't think it would be at all helpful, if almost all cogs listed "message_content" in their |
|
Considering that commands can be issued via --mentionable (or setting prefix to bot mention) without message intent, I would say to lean towards "message_content" in info.json being used for features that are unrelated to command issuance. Using prefix commands as justification for an intent request just leads to automatic denial, so Red should follow that guideline as well in terms of design.
Only if it means the entire cog can be controlled through that method. Does "has slash commands" imply you can ignore prefix commands entirely and the cog works entirely? Things to consider. |
d9be52d to
e50441b
Compare
e50441b to
ebbe54a
Compare
|
Now that I'm thinking about it, I'm not sure whether it makes sense for missing information about required intents to mean that the cog is treated as requiring both whenever it's presented, if we ignore the text-based commands use case. Presenting such cogs as likely requiring guild members intent (but not message content intent) might make more sense but it probably would make most sense to say they likely require at least one of those two. |

Description of the changes
This PR adds new
optional_privileged_intentsandrequired_privileged_intentskeys to coginfo.jsonthat specify the privileged intents that the cog needs. The required ones block the cog from being installed, while optional ones serve mostly as metadata that may be presented to the user to let them know that some functionality may be unavailable.optional_privileged_intentscan only be specified, ifrequired_privileged_intentsis specified too and Downloader will ignore it, if it appears on its own.The internal Downloader API checks
required_privileged_intentsin order to prevent install/update of a cog with missing required intents. Everything else (default "required" privileged intents and optional privileged intents) is handled entirely through Downloader cog's UI as it's informational-only.[p]cog infolists optional and required privileged intents along with the statement about the reason it's needed.Link to rendered info.json documentation:
https://red-discordbot--6829.org.readthedocs.build/en/6829/guide_publish_cogs.html#keys-specific-to-the-cog-info-json-case-sensitive
There are some things that may still need to be considered:
Have the changes in this PR been tested?
No