Discord Gateway Intents.
Intents are used to control which events your bot receives from the Gateway. Some intents are "privileged" and require enabling in the Discord Developer Portal.
Privileged Intents
:guild_members- Required to receive member-related events:guild_presences- Required to receive presence updates:message_content- Required to receive message content in guild messages
Example
config :eda,
intents: [:guilds, :guild_messages, :message_content]Or use shortcuts:
config :eda, intents: :all # All intents
config :eda, intents: :nonprivileged # All non-privileged intentsWhen :intents is not configured at all, EDA falls back to [:guilds]
(see EDA.intents/0) — not :nonprivileged.
Summary
Functions
Returns all available intent names.
Checks if a specific intent is enabled in a bitfield.
Returns non-privileged intent names.
Returns privileged intent names.
Converts a list of intent atoms to a bitfield integer.
Functions
@spec all_intents() :: [atom()]
Returns all available intent names.
Checks if a specific intent is enabled in a bitfield.
@spec nonprivileged_intents() :: [atom()]
Returns non-privileged intent names.
@spec privileged_intents() :: [atom()]
Returns privileged intent names.
Converts a list of intent atoms to a bitfield integer.
Examples
iex> EDA.Gateway.Intents.to_bitfield([:guilds, :guild_messages])
513
iex> EDA.Gateway.Intents.to_bitfield(:all)
# Returns all intents combined
iex> EDA.Gateway.Intents.to_bitfield(:nonprivileged)
# Returns all non-privileged intents