Core Reference

discord.__version__: str

demoutrei.discord package version

discord.DISCORD_EPOCH: int

Milliseconds since the first second of 2015

class discord.Client[source]

Represents a Discord client.

Parameters:

intents – Set of Gateway intents to associate with the client

property _http: HTTP

HTTP/S connection instance to the Discord API

async close(code: int = 4000, /) None[source]

Close connection from the Discord API

connect(*, gateway: bool = True) None[source]

Initiate a connection with the Discord API

Parameters:

gateway – Join connection with the gateway

event_listener() None[source]

Register a dispatch event listener

Parameters:

name – Name of the event to listen to

property intents: GatewayIntent

Set of Gateway intents to associate with the client.

property ws: Nullable[DiscordWebSocket]

WebSocket connection instance to the Discord gateway, if any.

class discord.Logger[source]

Singleton logger instance

classmethod debug(*messages: str) Self[source]
Parameters:

messages – Messages to log as DEBUG level

classmethod error(exception: BaseException, /) Self[source]
Parameters:

exception – Exception to log as ERROR level

classmethod info(*messages: str) Self[source]
Parameters:

messages – Messages to log as INFO level

classmethod warn(*messages: str) Self[source]
Parameters:

messages – Messages to log as WARN level