Skip to content

zaun_client::Event · Enum

pub enum Event { … }

One thing that happened.

A community is connected and its cache loaded: after a join, a creation, a restart, or the host coming back.

The community’s bots and their commands loaded (just after Event::Ready).

Who is online loaded (just after Event::Ready); Community::presences has it.

A member’s status or activity changed; offline members leave Community::presences.

A bot’s commands changed (Community::commands has the new list).

A bot was installed, updated, re-granted, enabled, disabled or crashed: its card.

A bot was removed.

As a bot: someone used one of this bot’s commands, components or modals.

A bot’s ephemeral reply to this member.

A bot asks this member to fill in a modal.

A bot’s autocomplete suggestions.

One of this member’s interactions got no answer.

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.

A message was deleted.

Several messages were deleted at once.

Someone added a reaction.

Someone took a reaction off.

A channel was made, or became visible to this member.

A channel changed.

A channel was deleted, or is no longer visible to this member.

A role was made.

A role changed.

A role was deleted.

Someone joined the community.

A member changed: their name, roles or timeout.

A member left or was removed.

Someone joined, left or changed state in a voice channel.

The community’s profile changed.

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).

The owner handed the community to a new host; this client is moving there.

This client moved with its community to the new host.

The new host refused this member; the move is given up.

The connection to a community’s host closed; the community stays saved.

No SimpleX relay is reachable.

A relay is reachable again.

Something was ignored safely; the text names no content or secret.

DM: a direct message became known: opened by either side, or found when the community loaded. recipient is the other participant.

DM: this member closed a direct 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.

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.

Any other community event, as the protocol has it.

Clone, Debug

Full rustdoc page