DiscordPHP Documentation

Payload
in package
implements JsonSerializable

Represents a Gateway event payload.

Gateway event payloads have a common structure, but the contents of the associated data (d) varies between the different events.

Tags
link
https://discord.com/developers/docs/topics/gateway#payloads-gateway-payload-structure

Table of Contents

Interfaces

JsonSerializable

Properties

$d  : mixed|null
$d  : mixed|null
$op  : int
$op  : int
$s  : int|null
$s  : int|null
$t  : string|null
$t  : string|null

Methods

__construct()  : mixed
__debugInfo()  : mixed
jsonSerialize()  : array<string|int, mixed>
new()  : self

Properties

$op

public int $op

Gateway opcode, which indicates the payload type.

$s

public int|null $s

Sequence number of event used for resuming sessions and heartbeating.

Methods

__construct()

public __construct(int $op[, mixed $d = null ][, int|null $s = null ][, string|null $t = null ]) : mixed
Parameters
$op : int
$d : mixed = null
$s : int|null = null
$t : string|null = null

__debugInfo()

public __debugInfo() : mixed

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

new()

public static new(int $op[, mixed $d = null ][, int|null $s = null ][, string|null $t = null ]) : self
Parameters
$op : int
$d : mixed = null
$s : int|null = null
$t : string|null = null
Return values
self

        
On this page

Search results