Enum discord::model::Event
[−]
[src]
pub enum Event { Ready(ReadyEvent), Resumed { trace: Vec<Option<String>>, }, UserUpdate(CurrentUser), UserNoteUpdate(UserId, String), UserSettingsUpdate { detect_platform_accounts: Option<bool>, developer_mode: Option<bool>, enable_tts_command: Option<bool>, inline_attachment_media: Option<bool>, inline_embed_media: Option<bool>, locale: Option<String>, message_display_compact: Option<bool>, render_embeds: Option<bool>, server_positions: Option<Vec<ServerId>>, show_current_game: Option<bool>, status: Option<String>, theme: Option<String>, convert_emoticons: Option<bool>, friend_source_flags: Option<FriendSourceFlags>, }, UserServerSettingsUpdate(UserServerSettings), VoiceStateUpdate(Option<ServerId>, VoiceState), VoiceServerUpdate { server_id: Option<ServerId>, channel_id: Option<ChannelId>, endpoint: Option<String>, token: String, }, CallCreate(Call), CallUpdate { channel_id: ChannelId, message_id: MessageId, region: String, ringing: Vec<UserId>, }, CallDelete(ChannelId), ChannelRecipientAdd(ChannelId, User), ChannelRecipientRemove(ChannelId, User), TypingStart { channel_id: ChannelId, user_id: UserId, timestamp: DateTime<UTC>, }, PresenceUpdate { presence: Presence, server_id: Option<ServerId>, roles: Option<Vec<RoleId>>, }, PresencesReplace(Vec<Presence>), RelationshipAdd(Relationship), RelationshipRemove(UserId, RelationshipType), MessageCreate(Message), MessageUpdate { id: MessageId, channel_id: ChannelId, kind: Option<MessageType>, content: Option<String>, nonce: Option<String>, tts: Option<bool>, pinned: Option<bool>, timestamp: Option<DateTime<FixedOffset>>, edited_timestamp: Option<DateTime<FixedOffset>>, author: Option<User>, mention_everyone: Option<bool>, mentions: Option<Vec<User>>, mention_roles: Option<Vec<RoleId>>, attachments: Option<Vec<Attachment>>, embeds: Option<Vec<Value>>, }, MessageAck { channel_id: ChannelId, message_id: Option<MessageId>, }, MessageDelete { channel_id: ChannelId, message_id: MessageId, }, MessageDeleteBulk { channel_id: ChannelId, ids: Vec<MessageId>, }, ServerCreate(PossibleServer<LiveServer>), ServerUpdate(Server), ServerDelete(PossibleServer<Server>), ServerMemberAdd(ServerId, Member), ServerMemberUpdate { server_id: ServerId, roles: Vec<RoleId>, user: User, nick: Option<String>, }, ServerMemberRemove(ServerId, User), ServerMembersChunk(ServerId, Vec<Member>), ServerSync { server_id: ServerId, large: bool, members: Vec<Member>, presences: Vec<Presence>, }, ServerRoleCreate(ServerId, Role), ServerRoleUpdate(ServerId, Role), ServerRoleDelete(ServerId, RoleId), ServerBanAdd(ServerId, User), ServerBanRemove(ServerId, User), ServerIntegrationsUpdate(ServerId), ServerEmojisUpdate(ServerId, Vec<Emoji>), ChannelCreate(Channel), ChannelUpdate(Channel), ChannelDelete(Channel), ChannelPinsAck { channel_id: ChannelId, timestamp: DateTime<FixedOffset>, }, ChannelPinsUpdate { channel_id: ChannelId, last_pin_timestamp: Option<DateTime<FixedOffset>>, }, ReactionAdd(Reaction), ReactionRemove(Reaction), Unknown(String, Map<String, Value>), // some variants omitted }
Event received over a websocket connection
Variants
Ready(ReadyEvent)
The first event in a connection, containing the initial state.
May also be received at a later time in the event of a reconnect.
Resumed
The connection has successfully resumed after a disconnect.
Fields of Resumed
trace: Vec<Option<String>> |
UserUpdate(CurrentUser)
Update to the logged-in user's information
UserNoteUpdate(UserId, String)
Update to a note that the logged-in user has set for another user.
UserSettingsUpdate
Update to the logged-in user's preferences or client settings
Fields of UserSettingsUpdate
detect_platform_accounts: Option<bool> | |
developer_mode: Option<bool> | |
enable_tts_command: Option<bool> | |
inline_attachment_media: Option<bool> | |
inline_embed_media: Option<bool> | |
locale: Option<String> | |
message_display_compact: Option<bool> | |
render_embeds: Option<bool> | |
server_positions: Option<Vec<ServerId>> | |
show_current_game: Option<bool> | |
status: Option<String> | |
theme: Option<String> | |
convert_emoticons: Option<bool> | |
friend_source_flags: Option<FriendSourceFlags> |
UserServerSettingsUpdate(UserServerSettings)
Update to the logged-in user's server-specific notification settings
VoiceStateUpdate(Option<ServerId>, VoiceState)
A member's voice state has changed
VoiceServerUpdate
Voice server information is available
Fields of VoiceServerUpdate
server_id: Option<ServerId> | |
channel_id: Option<ChannelId> | |
endpoint: Option<String> | |
token: String |
CallCreate(Call)
A new group call has been created
CallUpdate
A group call has been updated
Fields of CallUpdate
channel_id: ChannelId | |
message_id: MessageId | |
region: String | |
ringing: Vec<UserId> |
CallDelete(ChannelId)
A group call has been deleted (the call ended)
ChannelRecipientAdd(ChannelId, User)
A user has been added to a group
ChannelRecipientRemove(ChannelId, User)
A user has been removed from a group
TypingStart
A user is typing; considered to last 5 seconds
Fields of TypingStart
channel_id: ChannelId | |
user_id: UserId | |
timestamp: DateTime<UTC> |
PresenceUpdate
A member's presence state (or username or avatar) has changed
Fields of PresenceUpdate
presence: Presence | |
server_id: Option<ServerId> | |
roles: Option<Vec<RoleId>> |
PresencesReplace(Vec<Presence>)
The precense list of the user's friends should be replaced entirely
RelationshipAdd(Relationship)
RelationshipRemove(UserId, RelationshipType)
MessageCreate(Message)
MessageUpdate
A message has been edited, either by the user or the system
Fields of MessageUpdate
id: MessageId | |
channel_id: ChannelId | |
kind: Option<MessageType> | |
content: Option<String> | |
nonce: Option<String> | |
tts: Option<bool> | |
pinned: Option<bool> | |
timestamp: Option<DateTime<FixedOffset>> | |
edited_timestamp: Option<DateTime<FixedOffset>> | |
mention_everyone: Option<bool> | |
mentions: Option<Vec<User>> | |
mention_roles: Option<Vec<RoleId>> | |
attachments: Option<Vec<Attachment>> | |
embeds: Option<Vec<Value>> |
MessageAck
Another logged-in device acknowledged this message
Fields of MessageAck
channel_id: ChannelId | |
message_id: Option<MessageId> | May be |
MessageDelete
Fields of MessageDelete
channel_id: ChannelId | |
message_id: MessageId |
MessageDeleteBulk
Fields of MessageDeleteBulk
channel_id: ChannelId | |
ids: Vec<MessageId> |
ServerCreate(PossibleServer<LiveServer>)
ServerUpdate(Server)
ServerDelete(PossibleServer<Server>)
ServerMemberAdd(ServerId, Member)
ServerMemberUpdate
A member's roles have changed
Fields of ServerMemberUpdate
server_id: ServerId | |
roles: Vec<RoleId> | |
user: User | |
nick: Option<String> |
ServerMemberRemove(ServerId, User)
ServerMembersChunk(ServerId, Vec<Member>)
ServerSync
Fields of ServerSync
server_id: ServerId | |
large: bool | |
members: Vec<Member> | |
presences: Vec<Presence> |
ServerRoleCreate(ServerId, Role)
ServerRoleUpdate(ServerId, Role)
ServerRoleDelete(ServerId, RoleId)
ServerBanAdd(ServerId, User)
ServerBanRemove(ServerId, User)
ServerIntegrationsUpdate(ServerId)
ServerEmojisUpdate(ServerId, Vec<Emoji>)
ChannelCreate(Channel)
ChannelUpdate(Channel)
ChannelDelete(Channel)
ChannelPinsAck
Fields of ChannelPinsAck
channel_id: ChannelId | |
timestamp: DateTime<FixedOffset> |
ChannelPinsUpdate
Fields of ChannelPinsUpdate
channel_id: ChannelId | |
last_pin_timestamp: Option<DateTime<FixedOffset>> |
ReactionAdd(Reaction)
ReactionRemove(Reaction)
Unknown(String, Map<String, Value>)
An event type not covered by the above
Trait Implementations
impl Debug for Event
[src]
impl Clone for Event
[src]
fn clone(&self) -> Event
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more