You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we have hit the deadline for intents (Oct 7th), bots now operate under the default set of intents, which is all intents minus the privileged ones (members and presence).
For now, bots just declare their intents while instantiating the bot, but we could do something better.
My proposal is to add an intents key on the yaml configuration file, it would point to a list of strings representing the fields in the discord.Intents object. It would work like this:
Start off from the default set of intents, discord.Intents.default()
Add or remove intents if they are in the list or the string starts with ! respectively
Feed that to Bot(..., intents=intents)
Example, adding the members intent but removing the typing intent:
intents: [members, !typing]
The text was updated successfully, but these errors were encountered:
It accepts either a string or a list of strings—the former being a name of a discord.Intents classmethod, the latter a list of kwargs to pass to __init__.
! support is nice and I'll implement it in the future, probably by unifying the classmethod way and list way.
As we have hit the deadline for intents (Oct 7th), bots now operate under the default set of intents, which is all intents minus the privileged ones (
members
andpresence
).For now, bots just declare their intents while instantiating the bot, but we could do something better.
My proposal is to add an
intents
key on the yaml configuration file, it would point to a list of strings representing the fields in thediscord.Intents
object. It would work like this:discord.Intents.default()
!
respectivelyBot(..., intents=intents)
Example, adding the members intent but removing the typing intent:
The text was updated successfully, but these errors were encountered: