[−][src]Enum twilight_model::gateway::event::Event
Any type of event that a shard emits.
This brings together all of the types of DispatchEvent
s,
GatewayEvent
s, and ShardEvent
s.
Variants
BanAdd(BanAdd)
A user was banned from a guild.
BanRemove(BanRemove)
A user's ban from a guild was removed.
ChannelCreate(ChannelCreate)
A channel was created.
ChannelDelete(ChannelDelete)
A channel was deleted.
ChannelPinsUpdate(ChannelPinsUpdate)
A channel's pins were updated.
ChannelUpdate(ChannelUpdate)
A channel was updated.
GatewayHeartbeat(u64)
A heartbeat was sent to or received from the gateway.
A heartbeat acknowledgement was received from the gateway.
GatewayHello(u64)
A "hello" packet was received from the gateway.
GatewayInvalidateSession(bool)
A shard's session was invalidated.
true
if resumeable. If not, then the shard must do a full reconnect.
The gateway is indicating to perform a reconnect.
Undocumented event, should be ignored
GuildCreate(Box<GuildCreate>)
A guild was created.
GuildDelete(Box<GuildDelete>)
A guild was deleted or the current user was removed from a guild.
GuildEmojisUpdate(GuildEmojisUpdate)
A guild's emojis were updated.
GuildIntegrationsUpdate(GuildIntegrationsUpdate)
A guild's integrations were updated.
GuildUpdate(Box<GuildUpdate>)
A guild was updated.
InviteCreate(Box<InviteCreate>)
A invite was made.
InviteDelete(InviteDelete)
A invite was deleted.
A user was added to a guild.
MemberRemove(MemberRemove)
A user was removed from a guild.
MemberUpdate(Box<MemberUpdate>)
A user's member object in a guild was updated.
MemberChunk(MemberChunk)
A chunk of members were received from the gateway.
MessageCreate(Box<MessageCreate>)
A message was created in a channel.
MessageDelete(MessageDelete)
A message was deleted in a channel.
MessageDeleteBulk(MessageDeleteBulk)
Multiple messages were deleted in a channel.
MessageUpdate(Box<MessageUpdate>)
A message was updated in a channel.
PresenceUpdate(Box<PresenceUpdate>)
A user's active presence (such as game or online status) was updated.
Multiple presences outside of a guild were updated.
For bots this is always empty and useless.
ReactionAdd(Box<ReactionAdd>)
A reaction was added to a message.
ReactionRemove(Box<ReactionRemove>)
A reaction was removed from a message.
ReactionRemoveAll(ReactionRemoveAll)
All reactions were removed from a message.
ReactionRemoveEmoji(ReactionRemoveEmoji)
All instances of a given emoji from the reactions of a message were removed.
A shard is now "ready" and fully connected.
A shard has successfully resumed.
RoleCreate(RoleCreate)
A role was created in a guild.
RoleDelete(RoleDelete)
A role was deleted in a guild.
RoleUpdate(RoleUpdate)
A role was updated in a guild.
ShardConnected(Connected)
A shard is now in a connected stage after being fully connected to the gateway.
ShardConnecting(Connecting)
A shard is now in a connecting stage after starting to connect to the gateway.
ShardDisconnected(Disconnected)
A shard is now in a disconnected stage after the connection was closed.
ShardIdentifying(Identifying)
A shard is now in a identifying stage after starting a new session.
ShardReconnecting(Reconnecting)
A shard is now in a reconnecting stage after a disconnect or session was ended.
ShardPayload(Payload)
A payload of bytes came in through the shard's connection.
ShardResuming(Resuming)
A shard is now in a Resuming stage after a disconnect.
TypingStart(Box<TypingStart>)
A user started typing in a channel.
A guild is now unavailable.
UserUpdate(UserUpdate)
The current user was updated.
VoiceServerUpdate(VoiceServerUpdate)
A voice server update was sent.
VoiceStateUpdate(Box<VoiceStateUpdate>)
A voice state in a voice channel was updated.
WebhooksUpdate(WebhooksUpdate)
A webhook was updated.
Implementations
impl Event
[src]
Trait Implementations
impl Clone for Event
[src]
impl Debug for Event
[src]
impl Eq for Event
[src]
impl From<Box<DispatchEvent, Global>> for Event
[src]
pub fn from(event: Box<DispatchEvent>) -> Self
[src]
impl From<GatewayEvent> for Event
[src]
pub fn from(event: GatewayEvent) -> Self
[src]
impl From<ShardEvent> for Event
[src]
pub fn from(event: ShardEvent) -> Self
[src]
impl PartialEq<Event> for Event
[src]
impl StructuralEq for Event
[src]
impl StructuralPartialEq for Event
[src]
impl TryFrom<Event> for GatewayEvent
[src]
type Error = EventConversionError
The type returned in the event of a conversion error.
pub fn try_from(event: Event) -> Result<Self, Self::Error>
[src]
impl TryFrom<Event> for ShardEvent
[src]
type Error = EventConversionError
The type returned in the event of a conversion error.
pub fn try_from(event: Event) -> Result<Self, Self::Error>
[src]
impl TryFrom<Event> for DispatchEvent
[src]
Auto Trait Implementations
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,