DiscordShard
public protocol DiscordShard : DiscordWebSocketable, DiscordGatewayable
Protocol that represents a sharded gateway connection. This is the top-level protocol for DiscordEngineSpec
and
DiscordEngine
-
Whether this shard is connected to the gateway
Declaration
Swift
var connected: Bool
-
A reference to the client this engine is associated with.
Declaration
Swift
var delegate: DiscordShardDelegate?
-
The total number of shards.
Declaration
Swift
var numShards: Int
-
This shard’s number.
Declaration
Swift
var shardNum: Int
-
The main initializer.
Declaration
Swift
init(delegate: DiscordShardDelegate, shardNum: Int, numShards: Int)
Parameters
client
The client this engine should be associated with.