Expand description
Event bodies (specification §9): the §9.2 catalogue, the stream of each event, and decoding that ignores unknown event types (§9.4).
The envelope module hands Event::parse the envelope’s type and raw body.
Sequence, timestamp, actor and (for most events) channel_id are envelope fields (§7.4).
Re-exports§
pub use crate::limits::BULK_DELETE_MAX;
Structs§
- BotRemoved
bot.removed:{bot_id, member_id}.- Channel
Created channel.created: the channel object plusreason?: "access_gained"(§9.3).- Channel
Deleted channel.deleted:{channel_id, reason?: "access_lost"}(§9.3).- Channels
Reordered channel.reordered:positions(only channels the member can see).- Commands
Updated command.updated: one bot’s whole command list ([]while disabled or removed).- Descriptor
Updated community.descriptor_updated: signeddescriptoranddelegation.- DmClosed
dm.closed: to the closer’s own stream (§8.15).- Interaction
Autocomplete interaction.autocomplete: suggestions, to the invoker only.- Interaction
Failed interaction.failed, to the invoker only.- Interaction
Message interaction.message: an ephemeral message, to the invoker only.- Interaction
Modal interaction.modal: open a modal, to the invoker only.- Member
Left member.left:{member_id}.- Member
Removed member.removed:{reason}, to the subject only; then the session ends.- Member
Roles Updated member.roles_updated:{member_id, role_ids}.- Member
Timed Out member.timed_out:{member_id, until}.- Membership
Updated membership.updated:{member_id, state, until?}.- Message
Created message.created(§7.4, §9.2).- Message
Deleted message.deleted:{message_id}.- Message
Updated message.updated:{message_id, content, embeds?, components?, flags?, mentions?, edited_at}.- Messages
Bulk Deleted messages.bulk_deleted:{message_ids}(≤ 1 000).- Presence
Signal signal.presencelive event (§10.5).- Reaction
Changed reaction.addedandreaction.removed:{message_id, emoji, member_id}.- Role
Deleted role.deleted:{role_id}.- Roles
Reordered role.reordered:positions. SPEC: therole.reorderentry is reused.- Typing
Signal signal.typinglive event (§10.5):{channel_id, member_ids}in anamedchannel,{channel_id, count}in ananonymousone (who is typing is never sent there).- Voice
Joined voice.joined: a member entered a voice channel. Itskey_packageis present only for the channel’s other participants.- Voice
Keys voice.keys: another participant’s media key forepoch: its signed sender-keys message and the key wrapped for this participant only (never another’s).- Voice
Left voice.left: a member left a voice channel. The member itself receives it too.- Voice
Signal voice.signal: WebRTC signalling from another participant, to this one only.- Voice
Updated voice.updated: a participant’s mute, deafen orcan_speakchanged.
Enums§
- Ephemeral
Op opofinteraction.message.- Event
- A decoded event body: one variant per event of the §9.2 catalogue.
- Fail
Reason - Why an interaction failed.
- Parsed
- The result of decoding an event: known, or an unknown
typethat the client ignores while still advancing the stream’s cursor by itssequence(§9.4). Events in reserved namespaces (§13) are unknown too. - Removal
Reason reason: {t: "kicked" | "banned" | "left" | "rejected" | "expired"}.- Visibility
Reason - A visibility change (§9.3). SPEC: a plain string (
"access_gained"), as written. - Voice
Left Reason - Why a participant left a voice channel.