GatewayForwarderPlugin
The base class for all plugins
Extends
Constructors
Constructor
new GatewayForwarderPlugin(
options
):GatewayForwarderPlugin
Parameters
Parameter | Type |
---|---|
options | GatewayForwarderPluginOptions |
Returns
GatewayForwarderPlugin
Overrides
Properties
Property | Modifier | Type | Default value | Description | Overrides | Inherited from |
---|---|---|---|---|---|---|
client? | protected | Client | undefined | - | - | GatewayPlugin .client |
config | protected | GatewayForwarderPluginOptions | undefined | - | GatewayPlugin .config | - |
emitter | protected | EventEmitter | undefined | - | - | GatewayPlugin .emitter |
gatewayInfo? | protected | APIGatewayBotInfo | undefined | - | - | GatewayPlugin .gatewayInfo |
heartbeatInterval? | public | Timeout | undefined | - | - | GatewayPlugin .heartbeatInterval |
id | readonly | "gateway-forwarder" | "gateway-forwarder" | An ID that identifies the plugin uniquely between all other used plugins in the Client | GatewayPlugin .id | - |
lastHeartbeatAck | public | boolean | true | - | - | GatewayPlugin .lastHeartbeatAck |
monitor | protected | ConnectionMonitor | undefined | - | - | GatewayPlugin .monitor |
sequence | public | null | number | null | - | - | GatewayPlugin .sequence |
shardId? | public | number | undefined | - | - | GatewayPlugin .shardId |
state | protected | GatewayState | undefined | - | - | GatewayPlugin .state |
totalShards? | public | number | undefined | - | - | GatewayPlugin .totalShards |
ws | protected | null | WebSocket | null | - | - | GatewayPlugin .ws |
Methods
canResume()
protected
canResume():boolean
Returns
boolean
Inherited from
connect()
connect(
resume
):void
Parameters
Parameter | Type | Default value |
---|---|---|
resume | boolean | false |
Returns
void
Inherited from
createWebSocket()
protected
createWebSocket(url
):WebSocket
Parameters
Parameter | Type |
---|---|
url | string |
Returns
WebSocket
Inherited from
disconnect()
disconnect():
void
Returns
void
Inherited from
handleClose()
protected
handleClose(code
):void
Parameters
Parameter | Type |
---|---|
code | number |
Returns
void
Inherited from
handleReconnect()
protected
handleReconnect():void
Returns
void
Inherited from
handleReconnectionAttempt()
protected
handleReconnectionAttempt(options
):void
Parameters
Parameter | Type |
---|---|
options | { code : number ; forceNoResume : boolean ; isZombieConnection : boolean ; } |
options.code? | number |
options.forceNoResume? | boolean |
options.isZombieConnection? | boolean |
Returns
void
Inherited from
GatewayPlugin
.handleReconnectionAttempt
handleZombieConnection()
protected
handleZombieConnection():void
Returns
void
Inherited from
GatewayPlugin
.handleZombieConnection
identify()
protected
identify():void
Returns
void
Inherited from
registerClient()
registerClient(
client
):Promise
<void
>
Registers the client with this plugin
Parameters
Parameter | Type | Description |
---|---|---|
client | Client | The client to register |
Returns
Promise
<void
>
Inherited from
registerRoutes()?
optional
registerRoutes(client
):void
|Promise
<void
>
Registers the routes of this plugin with the client
Parameters
Parameter | Type | Description |
---|---|---|
client | Client | The client to register the routes with |
Returns
void
| Promise
<void
>
Inherited from
resume()
protected
resume():void
Returns
void
Inherited from
send()
send(
payload
):void
Parameters
Parameter | Type |
---|---|
payload | GatewayPayload |
Returns
void
Inherited from
setupWebSocket()
protected
setupWebSocket():void
Returns
void