Gateway
Defined in: classes/gateway.ts:8
Connects to Discord Gateway
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Gateway(
props):Gateway
Defined in: classes/gateway.ts:33
Instantiate a new Gateway
Parameters
Section titled “Parameters”Gateway props
Returns
Section titled “Returns”Gateway
Gateway instance
Properties
Section titled “Properties”events
Section titled “events”events:
EventHandler<GatewayEventMap>
Defined in: classes/gateway.ts:12
Event handler for gateway dispatch events
intents
Section titled “intents”intents:
number
Defined in: classes/gateway.ts:15
Intents bitfield
rest:
RESTManager
Defined in: classes/gateway.ts:18
Used for REST API calls
optionalws:WebSocket
Defined in: classes/gateway.ts:21
WebSocket for connecting to Discord’s gateway
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get token():
string
Defined in: classes/gateway.ts:24
Bot token used for authorization
Returns
Section titled “Returns”string
Methods
Section titled “Methods”connect()
Section titled “connect()”connect():
Promise<Gateway>
Defined in: classes/gateway.ts:61
Connect to Discord’s gateway
Returns
Section titled “Returns”Promise<Gateway>
Gateway instance