[][src]Enum serenity::client::bridge::gateway::ShardRunnerMessage

pub enum ShardRunnerMessage {
    ChunkGuild {
        guild_id: GuildId,
        limit: Option<u16>,
        filter: ChunkGuildFilter,
        nonce: Option<String>,
    },
    Close(u16Option<String>),
    Message(Message),
    SetActivity(Option<Activity>),
    SetPresence(OnlineStatusOption<Activity>),
    SetStatus(OnlineStatus),
    SetMessageFilter(MessageFilter),
    SetReactionFilter(ReactionFilter),
}

A message to send from a shard over a WebSocket.

Variants

ChunkGuild

Indicates that the client is to send a member chunk message.

Fields of ChunkGuild

guild_id: GuildId

The IDs of the Guild to chunk.

limit: Option<u16>

The maximum number of members to receive GuildMembersChunkEvents for.

filter: ChunkGuildFilter

A filter to apply to the returned members.

nonce: Option<String>

Optional nonce to identify GuildMembersChunkEvent responses.

Close(u16Option<String>)

Indicates that the client is to close with the given status code and reason.

You should rarely - if ever - need this, but the option is available. Prefer to use the ShardManager to shutdown WebSocket clients if you are intending to send a 1000 close code.

Message(Message)

Indicates that the client is to send a custom WebSocket message.

SetActivity(Option<Activity>)

Indicates that the client is to update the shard's presence's activity.

SetPresence(OnlineStatusOption<Activity>)

Indicates that the client is to update the shard's presence in its entirity.

SetStatus(OnlineStatus)

Indicates that the client is to update the shard's presence's status.

SetMessageFilter(MessageFilter)

Sends a new filter for messages to the shard.

SetReactionFilter(ReactionFilter)

Sends a new filter for reactions to the shard.

Trait Implementations

impl Clone for ShardRunnerMessage[src]

impl Debug for ShardRunnerMessage[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]