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

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

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

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.

Tuple Fields of Close

0: u161: Option<String>
Message

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

Tuple Fields of Message

0: Message
SetActivity

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

Tuple Fields of SetActivity

0: Option<Activity>
SetPresence

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

Tuple Fields of SetPresence

0: OnlineStatus1: Option<Activity>
SetStatus

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

Tuple Fields of SetStatus

0: OnlineStatus
SetEventFilter
This is supported on crate feature collector only.

Sends a new filter for events to the shard.

Tuple Fields of SetEventFilter

0: EventFilter
SetMessageFilter
This is supported on crate feature collector only.

Sends a new filter for messages to the shard.

Tuple Fields of SetMessageFilter

0: MessageFilter
SetReactionFilter
This is supported on crate feature collector only.

Sends a new filter for reactions to the shard.

Tuple Fields of SetReactionFilter

0: ReactionFilter
SetComponentInteractionFilter
This is supported on crate features unstable_discord_api and collector only.

Sends a new filter for component interactions to the shard.

Tuple Fields of SetComponentInteractionFilter

0: ComponentInteractionFilter

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.