Enum dasi::model::Event
[−]
[src]
pub enum Event {
Ready(ReadyEvent),
Resumed {
heartbeat_interval: u64,
trace: Vec<Option<String>>,
},
UserUpdate(CurrentUser),
UserSettingsUpdate {
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>,
show_current_game: Option<bool>,
theme: Option<String>,
convert_emoticons: Option<bool>,
allow_email_friend_request: Option<bool>,
friend_source_flags: Option<FriendSourceFlags>,
},
UserServerSettingsUpdate(UserServerSettings),
VoiceStateUpdate(ServerId, VoiceState),
VoiceServerUpdate {
server_id: ServerId,
endpoint: Option<String>,
token: String,
},
TypingStart {
channel_id: ChannelId,
user_id: UserId,
timestamp: u64,
},
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,
content: Option<String>,
nonce: Option<String>,
tts: Option<bool>,
timestamp: Option<String>,
edited_timestamp: Option<String>,
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,
},
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>),
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),
Unknown(String, BTreeMap<String, Value>),
// some variants omitted
}Event received over a websocket connection
Variants
Ready | 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
| |||||||||||||||||||||||||||
UserUpdate | Update to the logged-in user's information | |||||||||||||||||||||||||||
UserSettingsUpdate | Update to the logged-in user's preferences or client settings Fields
| |||||||||||||||||||||||||||
UserServerSettingsUpdate | Update to the logged-in user's server-specific notification settings | |||||||||||||||||||||||||||
VoiceStateUpdate | A member's voice state has changed | |||||||||||||||||||||||||||
VoiceServerUpdate | Voice server information is available Fields
| |||||||||||||||||||||||||||
TypingStart | A user is typing; considered to last 5 seconds Fields
| |||||||||||||||||||||||||||
PresenceUpdate | A member's presence state (or username or avatar) has changed Fields
| |||||||||||||||||||||||||||
PresencesReplace | The precense list of the user's friends should be replaced entirely | |||||||||||||||||||||||||||
RelationshipAdd | ||||||||||||||||||||||||||||
RelationshipRemove | ||||||||||||||||||||||||||||
MessageCreate | ||||||||||||||||||||||||||||
MessageUpdate | A message has been edited, either by the user or the system Fields
| |||||||||||||||||||||||||||
MessageAck | Another logged-in device acknowledged this message Fields
| |||||||||||||||||||||||||||
MessageDelete | Fields
| |||||||||||||||||||||||||||
ServerCreate | ||||||||||||||||||||||||||||
ServerUpdate | ||||||||||||||||||||||||||||
ServerDelete | ||||||||||||||||||||||||||||
ServerMemberAdd | ||||||||||||||||||||||||||||
ServerMemberUpdate | A member's roles have changed Fields
| |||||||||||||||||||||||||||
ServerMemberRemove | ||||||||||||||||||||||||||||
ServerMembersChunk | ||||||||||||||||||||||||||||
ServerRoleCreate | ||||||||||||||||||||||||||||
ServerRoleUpdate | ||||||||||||||||||||||||||||
ServerRoleDelete | ||||||||||||||||||||||||||||
ServerBanAdd | ||||||||||||||||||||||||||||
ServerBanRemove | ||||||||||||||||||||||||||||
ServerIntegrationsUpdate | ||||||||||||||||||||||||||||
ServerEmojisUpdate | ||||||||||||||||||||||||||||
ChannelCreate | ||||||||||||||||||||||||||||
ChannelUpdate | ||||||||||||||||||||||||||||
ChannelDelete | ||||||||||||||||||||||||||||
Unknown | An event type not covered by the above |