# Enum Event

> One thing that happened.

`zaun_client::Event` · Enum

```rust
pub enum Event { … }
```

One thing that happened.

## Variants

### `Ready(Community)`

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

### `AppsReady(Community)`

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

### `PresencesReady(Community)`

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

### `PresenceUpdate { community, presence }`

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

### `CommandsUpdate { community, bot }`

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

### `BotUpdate { community, card }`

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

### `BotRemove { community, bot, member }`

A bot was removed.

### `InteractionCreate(Box<Interaction>)`

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

### `InteractionReply(EphemeralReply)`

A bot's ephemeral reply to this member.

### `ModalOpen(ModalOpen)`

A bot asks this member to fill in a modal.

### `Autocomplete(Suggestions)`

A bot's autocomplete suggestions.

### `InteractionFail(InteractionFailure)`

One of this member's interactions got no answer.

### `MessageCreate(Message)`

A new message.

### `MessageUpdate { message, author, content, embeds, mentions, edited_at }`

A message was edited by its author.

### `MessageDelete { message, by }`

A message was deleted.

### `MessageDeleteBulk { channel, messages }`

Several messages were deleted at once.

### `ReactionAdd(Reaction)`

Someone added a reaction.

### `ReactionRemove(Reaction)`

Someone took a reaction off.

### `ChannelCreate(Channel)`

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

### `ChannelUpdate(Channel)`

A channel changed.

### `ChannelDelete(Channel)`

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

### `RoleCreate(Role)`

A role was made.

### `RoleUpdate(Role)`

A role changed.

### `RoleDelete(Role)`

A role was deleted.

### `MemberAdd(Member)`

Someone joined the community.

### `MemberUpdate(Member)`

A member changed: their name, roles or timeout.

### `MemberRemove(Member)`

A member left or was removed.

### `VoiceStateUpdate(VoiceState)`

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

### `CommunityUpdate(Community)`

The community's profile changed.

### `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 }`

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

### `CommunityMoved { community, host }`

This client moved with its community to the new host.

### `CommunityMoveRefused { community, code }`

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

### `Disconnect(Community)`

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

### `Offline`

No SimpleX relay is reachable.

### `Online`

A relay is reachable again.

### `Warning(String)`

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

### `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)`

DM: this member closed a direct message.

### `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 }`

A post made with `Channel::send_pending` did not go
through; the pending one shown should say so.

### `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 }`

Any other community event, as the protocol has it.

## Trait implementations

`Clone`, `Debug`

[Full rustdoc page](/docs/api/rust/zaun-client/zaun_client/events/enum.Event.html)
