Objects¶
- class discord.ext.ipc.ClientPayload(payload)¶
Bases:
objectThe payload delivered to an endpoint when a call is made.
This may be subclassed to provide a custom payload. If a route is not type-hinted with a custom payload, this base payload is used. Keys can be accessed like a dictionary (
payload["key"]) or as attributes (payload.key).- Parameters:
payload (
dict) – The raw payload to wrap.
- length¶
The length of the payload.
- Type:
int
- endpoint¶
The endpoint that was called.
- Type:
str| None
- data¶
The keyword arguments sent with the call.
- Type:
dict| None
- items()¶
Return the payload as dictionary items.
- Return type:
ItemsView[str,Any]
- class discord.ext.ipc.ServerResponse(payload)¶
Bases:
objectThe response returned to the client by the server.
- Parameters:
payload (
str|bytes) – The raw payload to decode.
- property response: dict[str, Any] | str¶
The decoded response, ready for use.
- property error: dict[str, Any] | None¶
Any error returned by the server, if present.
- property status: StatusEnum¶
The status code, converted to an
enum.Enum.
- class discord.ext.ipc.StatusEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum