GatewayApiOptions class

Options for connecting to the Discord API for making HTTP requests and connecting to the Gateway with a bot token.

Inheritance

Constructors

GatewayApiOptions({required String token, String userAgent = defaultUserAgent, required Flags<GatewayIntents> intents, GatewayPayloadFormat payloadFormat = GatewayPayloadFormat.json, GatewayCompression compression = GatewayCompression.transport, List<int>? shards, int? totalShards, int? largeThreshold, PresenceBuilder? initialPresence})
Create a new GatewayApiOptions.

Properties

apiVersion int
The version of the API to use.
no setterinherited
authorizationHeader String
The value of the Authorization header to use when authenticating requests.
no setterinherited
baseUri String
The base URI relative to the host where the API can be found.
no setterinherited
cdnHost String
The host at which the CDN can be found.
no setterinherited
compression GatewayCompression
The compression to use on the Gateway connection.
final
gatewayConnectionOptions Map<String, String>
The query parameters to append to the Gateway connection URL.
no setter
hashCode int
The hash code for this object.
no setterinherited
host String
The host at which the API can be found.
no setterinherited
initialPresence PresenceBuilder?
The presence the client will set after first connecting to the Gateway.
final
intents Flags<GatewayIntents>
The intents to use.
final
largeThreshold int?
The threshold after which guilds are considered large in the Gateway.
final
payloadFormat GatewayPayloadFormat
The format of the Gateway payloads.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shards List<int>?
The IDs of the shards to spawn by this client.
final
token String
The token to use.
finalinherited
totalShards int?
The total number of shards in the current session.
final
userAgent String
The value of the User-Agent header to send with each request.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited