Struct twilight_gateway::Intents [−][src]
pub struct Intents { /* fields omitted */ }
Expand description
Gateway intents.
Developers must specify intents when connecting to the gateway. The
intents specified correspond with the events received. To specify
multiple intents, create a union using the |
operator. See the
discord docs for more information.
Implementations
Guilds intent.
Event(s) received:
Guild members intent.
This intent is privileged. See the discord docs for more information.
Event(s) received:
Guild presences intent.
This intent is privileged. See the discord docs for more information.
Event(s) received:
Guild messages intent.
Event(s) received:
Guild message reactions intent.
Event(s) received:
Direct messages intent.
Event(s) received:
This is different from the GUILD_MESSAGES
intent in that the bot
will receive message events from locations other than guilds.
Direct message reactions intent.
Event(s) received:
MESSAGE_REACTION_ADD
MESSAGE_REACTION_REMOVE
MESSAGE_REACTION_REMOVE_ALL
MESSAGE_REACTION_REMOVE_EMOJI
This is different from the GUILD_MESSAGE_REACTIONS
event in that
the bot will receive message reaction events from locations other
than guilds.
Direct message typing intent.
Event(s) received:
This is different from the GUILD_MESSAGE_TYPING
intent in that
the bot will receive typing start events from locations other than
guilds.
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Returns true
if there are flags common to both self
and other
.
Returns true
all of the flags in other
are contained within self
.
Trait Implementations
Disables all flags disabled in the set.
Adds the set of flags.
Toggles the set of flags.
pub fn deserialize<D>(
deserializer: D
) -> Result<Intents, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
pub fn deserialize<D>(
deserializer: D
) -> Result<Intents, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Extends a collection with the contents of an iterator. Read more
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Disables all flags enabled in the set.
Auto Trait Implementations
impl RefUnwindSafe for Intents
impl UnwindSafe for Intents
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V