Enum discord::model::Event [] [src]

pub enum Event {
    Ready(ReadyEvent),
    Resumed {
        trace: Vec<Option<String>>,
    },
    UserUpdate(CurrentUser),
    UserNoteUpdate(UserIdString),
    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(ChannelIdUser),
    ChannelRecipientRemove(ChannelIdUser),
    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(UserIdRelationshipType),
    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(ServerIdMember),
    ServerMemberUpdate {
        server_id: ServerId,
        roles: Vec<RoleId>,
        user: User,
        nick: Option<String>,
    },
    ServerMemberRemove(ServerIdUser),
    ServerMembersChunk(ServerIdVec<Member>),
    ServerSync {
        server_id: ServerId,
        large: bool,
        members: Vec<Member>,
        presences: Vec<Presence>,
    },
    ServerRoleCreate(ServerIdRole),
    ServerRoleUpdate(ServerIdRole),
    ServerRoleDelete(ServerIdRoleId),
    ServerBanAdd(ServerIdUser),
    ServerBanRemove(ServerIdUser),
    ServerIntegrationsUpdate(ServerId),
    ServerEmojisUpdate(ServerIdVec<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(StringMap<String, Value>),
    // some variants omitted
}

Event received over a websocket connection

Variants

The first event in a connection, containing the initial state.

May also be received at a later time in the event of a reconnect.

The connection has successfully resumed after a disconnect.

Fields of Resumed

Update to the logged-in user's information

Update to a note that the logged-in user has set for another user.

Update to the logged-in user's preferences or client settings

Fields of UserSettingsUpdate

Update to the logged-in user's server-specific notification settings

A member's voice state has changed

Voice server information is available

Fields of VoiceServerUpdate

A new group call has been created

A group call has been updated

Fields of CallUpdate

A group call has been deleted (the call ended)

A user has been added to a group

A user has been removed from a group

A user is typing; considered to last 5 seconds

Fields of TypingStart

A member's presence state (or username or avatar) has changed

Fields of PresenceUpdate

The precense list of the user's friends should be replaced entirely

A message has been edited, either by the user or the system

Fields of MessageUpdate

Another logged-in device acknowledged this message

Fields of MessageAck

May be None if a private channel with no messages has closed.

Fields of MessageDelete

Fields of MessageDeleteBulk

A member's roles have changed

Fields of ServerMemberUpdate

Fields of ServerSync

Fields of ChannelPinsAck

Fields of ChannelPinsUpdate

An event type not covered by the above

Trait Implementations

impl Debug for Event
[src]

Formats the value using the given formatter.

impl Clone for Event
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more