discord-interactions

Enumerable Objects

class interactions.api.enums.DefaultErrorType(value)

An enumerable object for the default errors that occur with interaction creation.

Note

This is a port from v3’s errors, which basically delegate errors to a unique error code. This enum’s purpose is to help remember error codes. Importing this class is not required.

i.e. : raise InteractionException(1) == raise InteractionException(REQUEST_FAILURE)

class interactions.api.enums.OpCodeType(value)

An enumerable object for the Gateway’s OPCODE result state. This is representative of the OPCodes generated by the WebSocket.

Note

Equivalent of Gateway Opcodes in the Discord API.

class interactions.api.enums.WSCloseCodeType(value)

An enumerable object for the Gateway’s closing connection codes. This is representative of the Gateway responses generated by the WebSocket.

Note

Equivalent of Gateway Close Event Codes in the Discord API.

class interactions.api.enums.HTTPResponseType(value)

An enumerable object for the HTTP response codes Discord gives out.

Note

This enumerable does not list the documented “5xx”, as it may vary.

class interactions.api.enums.JSONResponseType(value)

An enumerable object for the JSON error response codes Discord gives out.

Note

Equivalent of JSON Error Codes in the Discord API.