Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BotSocket

Creates and manages socket shards

Hierarchy

  • BotSocket

Index

Constructors

constructor

Properties

Readonly bot

bot: Bot

gatewayURL

gatewayURL: string

sessionStartLimit

sessionStartLimit: SessionStartLimit

Methods

checkShardsState

modifyPresence

shardChangedState

  • Called when a shard under this socket changes its state. If all shards under this socket now have the same state, a message will be sent to the BotShardManager telling it to emit an event for all shards

    example
    this.botSocket.shardChangedState(
     BotSocketShardState.Ready,
     BotShardState.Ready,
     BotEvents.Ready,
    );

    Parameters

    Returns void

startShards

  • startShards(timeout?: number): Promise<void>
  • Start and connect every bot shard

    Parameters

    • Default value timeout: number = recommendedShardTimeout

    Returns Promise<void>

stopShards

Generated using TypeDoc