Enum Event
zaun_client::Event · Enum
pub enum Event { … }One thing that happened.
Variants
Section titled “Variants”Ready(Community)
Section titled “Ready(Community)”A community is connected and its cache loaded: after a join, a creation, a restart, or the host coming back.
AppsReady(Community)
Section titled “AppsReady(Community)”The community’s bots and their commands loaded (just after Event::Ready).
PresencesReady(Community)
Section titled “PresencesReady(Community)”Who is online loaded (just after Event::Ready); Community::presences has it.
PresenceUpdate { community, presence }
Section titled “PresenceUpdate { community, presence }”A member’s status or activity changed; offline members leave
Community::presences.
CommandsUpdate { community, bot }
Section titled “CommandsUpdate { community, bot }”A bot’s commands changed (Community::commands has the new list).
BotUpdate { community, card }
Section titled “BotUpdate { community, card }”A bot was installed, updated, re-granted, enabled, disabled or crashed: its card.
BotRemove { community, bot, member }
Section titled “BotRemove { community, bot, member }”A bot was removed.
InteractionCreate(Box<Interaction>)
Section titled “InteractionCreate(Box<Interaction>)”As a bot: someone used one of this bot’s commands, components or modals.
InteractionReply(EphemeralReply)
Section titled “InteractionReply(EphemeralReply)”A bot’s ephemeral reply to this member.
ModalOpen(ModalOpen)
Section titled “ModalOpen(ModalOpen)”A bot asks this member to fill in a modal.
Autocomplete(Suggestions)
Section titled “Autocomplete(Suggestions)”A bot’s autocomplete suggestions.
InteractionFail(InteractionFailure)
Section titled “InteractionFail(InteractionFailure)”One of this member’s interactions got no answer.
MessageCreate(Message)
Section titled “MessageCreate(Message)”A new message.
MessageUpdate { message, author, content, embeds, mentions, edited_at }
Section titled “MessageUpdate { message, author, content, embeds, mentions, edited_at }”A message was edited by its author.
MessageDelete { message, by }
Section titled “MessageDelete { message, by }”A message was deleted.
MessageDeleteBulk { channel, messages }
Section titled “MessageDeleteBulk { channel, messages }”Several messages were deleted at once.
ReactionAdd(Reaction)
Section titled “ReactionAdd(Reaction)”Someone added a reaction.
ReactionRemove(Reaction)
Section titled “ReactionRemove(Reaction)”Someone took a reaction off.
ChannelCreate(Channel)
Section titled “ChannelCreate(Channel)”A channel was made, or became visible to this member.
ChannelUpdate(Channel)
Section titled “ChannelUpdate(Channel)”A channel changed.
ChannelDelete(Channel)
Section titled “ChannelDelete(Channel)”A channel was deleted, or is no longer visible to this member.
RoleCreate(Role)
Section titled “RoleCreate(Role)”A role was made.
RoleUpdate(Role)
Section titled “RoleUpdate(Role)”A role changed.
RoleDelete(Role)
Section titled “RoleDelete(Role)”A role was deleted.
MemberAdd(Member)
Section titled “MemberAdd(Member)”Someone joined the community.
MemberUpdate(Member)
Section titled “MemberUpdate(Member)”A member changed: their name, roles or timeout.
MemberRemove(Member)
Section titled “MemberRemove(Member)”A member left or was removed.
VoiceStateUpdate(VoiceState)
Section titled “VoiceStateUpdate(VoiceState)”Someone joined, left or changed state in a voice channel.
CommunityUpdate(Community)
Section titled “CommunityUpdate(Community)”The community’s profile changed.
CommunityDelete { community, reason }
Section titled “CommunityDelete { community, reason }”This client left a community, or was removed from it (kicked, banned, …); it is
forgotten here, keys and saved state included. A removal while this client was away
comes on its next session, from a host after 0.4.0 (which says it again after a
welcome without the binding, or sends an uncorrelated BANNED).
CommunityMoving { community, host }
Section titled “CommunityMoving { community, host }”The owner handed the community to a new host; this client is moving there.
CommunityMoved { community, host }
Section titled “CommunityMoved { community, host }”This client moved with its community to the new host.
CommunityMoveRefused { community, code }
Section titled “CommunityMoveRefused { community, code }”The new host refused this member; the move is given up.
Disconnect(Community)
Section titled “Disconnect(Community)”The connection to a community’s host closed; the community stays saved.
Offline
Section titled “Offline”No SimpleX relay is reachable.
Online
Section titled “Online”A relay is reachable again.
Warning(String)
Section titled “Warning(String)”Something was ignored safely; the text names no content or secret.
DmCreate { channel, recipient }
Section titled “DmCreate { channel, recipient }”DM: a direct message became known: opened by either side, or found when the
community loaded. recipient is the other participant.
DmDelete(Channel)
Section titled “DmDelete(Channel)”DM: this member closed a direct message.
MessageSent { pending, message }
Section titled “MessageSent { pending, message }”A post made with Channel::send_pending is in: the
host accepted it as message, which replaces the pending one shown (matched by
pending). Its message.created may also arrive as a Event::MessageCreate.
MessageSendFailed { pending, channel, error }
Section titled “MessageSendFailed { pending, channel, error }”A post made with Channel::send_pending did not go
through; the pending one shown should say so.
TypingStart { channel, typing }
Section titled “TypingStart { channel, typing }”Someone else is typing in a channel (typing): members by id in a named channel, only
how many in an anonymous one. It shows for TYPING_SHOWN_MS
unless repeated; Channel::typing gives the current state.
Raw { community, channel, actor, event }
Section titled “Raw { community, channel, actor, event }”Any other community event, as the protocol has it.
Trait implementations
Section titled “Trait implementations”Clone, Debug