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

@event_listener(name)

Register a dispatch event listener

Parameters:

name – Name of the event to listen to

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

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.