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
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 GuildMembersChunkEvent
s
for.
filter: ChunkGuildFilter
A filter to apply to the returned members.
nonce: Option<String>
Optional nonce to identify GuildMembersChunkEvent
responses.
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.
Indicates that the client is to send a custom WebSocket message.
Indicates that the client is to update the shard’s presence’s activity.
Indicates that the client is to update the shard’s presence in its entirity.
Tuple Fields of SetPresence
0: OnlineStatus
1: Option<Activity>
Indicates that the client is to update the shard’s presence’s status.
Tuple Fields of SetStatus
0: OnlineStatus
collector
only.Sends a new filter for events to the shard.
Tuple Fields of SetEventFilter
0: EventFilter
collector
only.Sends a new filter for messages to the shard.
Tuple Fields of SetMessageFilter
collector
only.Sends a new filter for reactions to the shard.
Tuple Fields of SetReactionFilter
unstable_discord_api
and collector
only.Sends a new filter for component interactions to the shard.
Tuple Fields of SetComponentInteractionFilter
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ShardRunnerMessage
impl Send for ShardRunnerMessage
impl Sync for ShardRunnerMessage
impl Unpin for ShardRunnerMessage
impl !UnwindSafe for ShardRunnerMessage
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self