Struct discord::State [] [src]

pub struct State { /* fields omitted */ }

Known state composed from received events.

Methods

impl State
[src]

Create a new state from an initial ReadyEvent.

Count the total number of server members not yet downloaded.

Build a list of all known private and group channel IDs.

Build a list of all known server IDs.

Update the state according to the changes described in the given event.

Get information about the logged-in user.

Get the servers this user has access to.

Get the currently unavailable servers.

Get the active 1-on-1 private channels with other users.

Get the active groups with other users.

Get the currently ongoing calls.

Calls which were already ongoing when the user connected may require calling Connection::sync_calls to appear here.

Get the presences of online friends.

Usually empty for bot accounts.

Get the friend/block relationships with other users.

Usually empty for bot accounts.

Get the logged-in user's client settings.

Returns None on bot accounts.

Get the logged-in user's per-server notification settings.

Returns None on bot accounts.

Get the map of notes that have been made by this user.

Returns None on bot accounts.

Look up a server by its ID.

Look up a private or public channel by its ID.

Look up the voice channel or group call a user is in, if any.

For bot users which may be in multiple voice channels, the first found is returned.

Trait Implementations

impl Debug for State
[src]

Formats the value using the given formatter.

impl Clone for State
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more