HTTP Reference

All endpoint functions are accessible from your Client._http attribute.

class discord._http.HTTP[source]

Represents an HTTP/S connection to the Discord API

async get_gateway() HTTPResponse[source]

Returns an object containing a valid WSS URL which the application can use when connecting to the gateway

async get_gateway_bot() HTTPResponse[source]

Returns an object based on the information in get_gateway(), plus additional metadata that can help during the operation of large or sharded bots.

class discord._http.HTTPResponse[source]

Represents an HTTP response

property reason: str

HTTP status reason of the response

property status: int

HTTP status code of the response