DiscordGatewayPayload
public struct DiscordGatewayPayload : Encodable
Represents a gateway payload. This is lowest level of the Discord API.
-
The payload code.
Declaration
Swift
public let code: DiscordGatewayCode
-
The payload data.
Declaration
Swift
public let payload: DiscordGatewayPayloadData
-
The sequence number of this dispatch.
Declaration
Swift
public let sequenceNumber: Int?
-
The name of this dispatch.
Declaration
Swift
public let name: String?
-
Creates a new DiscordGatewayPayload.
Declaration
Swift
public init(code: DiscordGatewayCode, payload: DiscordGatewayPayloadData, sequenceNumber: Int? = nil, name: String? = nil)
Parameters
code
The code of this payload
payload
The data of this payload
sequenceNumber
An optional sequence number for this dispatch
name
The name of this dispatch
-
Encodable implementation.
Declaration
Swift
public func encode(to encoder: Encoder) throws