scarletcafe / jishaku

A debugging and testing cog for discord.py rewrite bots.
https://jishaku.readthedocs.io/en/latest/
MIT License
541 stars 181 forks source link

Add support for the message_content intent #150

Closed BobDotCom closed 2 years ago

BobDotCom commented 2 years ago

Rationale

Privileged intents are listed in the root command, and this adds support for detection of the "message_content" intent, if available. Contrary to #142, this uses the specific message content intent (unlike the messages intent it only applies to content, hence the name - and is also privileged). This intent is not supported by discord.py, but as it's a name declared by the API, it can be considered a "standard" name and should be consistent across forks (A "Smaller feature-detection based change" as defined here). If this feature does not detect support for the message_content intent, it will revert to the old functionality (simply not displaying info on this intent).

I can personally verify that this works with Pycord (already on API v10), and should work with disnake when their v10 support PR is merged. The same should be true for edpy, when their v10 PR is merged, and nextcord as well - when this PR is merged.

Summary of changes made

Pretty straightforward, simply adds the message_content intent to the root command. At first I thought this would be useless, but bots can still receive message content without the intent in some cases, so the command can be invoked even if the intent is off.

Checklist

BobDotCom commented 2 years ago

Unsure why the AppVeyor CI failed. It says invalid Slack webhook, so I assume it's unrelated to my code.

ooliver1 commented 2 years ago

Would be nice if we got a comment on that