Enum discord::model::Event
[−]
[src]
pub enum Event { Ready(ReadyEvent), 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>>, attachments: Option<Vec<Attachment>>, embeds: Option<Vec<Value>>, }, MessageAck { channel_id: ChannelId, message_id: Option<MessageId>, }, MessageDelete { channel_id: ChannelId, message_id: MessageId, }, ServerCreate(LiveServer), ServerUpdate(Server), ServerDelete(Server), ServerMemberAdd(ServerId, Member), ServerMemberUpdate { server_id: ServerId, roles: Vec<RoleId>, user: User, }, 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), GatewayChanged(String, ReadyEvent), Unknown(String, BTreeMap<String, Value>), Closed(u16), // some variants omitted }
Event received over a websocket connection
Variants
Ready | The first event in a connection, containing the initial state | |||||||||||||||||||||||||
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 | ||||||||||||||||||||||||||
GatewayChanged | The connection's gateway has changed and a new Ready is available | |||||||||||||||||||||||||
Unknown | An event type not covered by the above | |||||||||||||||||||||||||
Closed | A websocket "close" frame with the given status |
Methods
impl Event
[src]
Trait Implementations
Derived Implementations
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