max_messages (Optional[int]) –
The maximum number of messages to store in the internal message cache.
This defaults to 1000. Passing in None disables the message cache.
Changed in version 1.3: Allow disabling the message cache and change the default size to 1000.
max_lobby_messages (Optional[int]) – The maximum number of lobby messages to store in the internal lobby message cache.
This defaults to 1000. Passing in None disables the lobby message cache.
proxy (Optional[str]) – Proxy URL.
proxy_auth (Optional[aiohttp.BasicAuth]) – An object that represents proxy HTTP Basic Authorization.
application_id (int) – The client’s application ID.
intents (Optional[Intents]) –
The intents that you want to enable for the session. This is a way of
disabling and enabling certain Gateway events from triggering and being sent.
Changed in version 2.0: Parameter is now required.
member_cache_flags (MemberCacheFlags) –
Allows for finer control over how the library caches members.
If not given, defaults to cache as much as possible with the
currently selected intents.
chunk_guilds_at_startup (bool) –
Indicates if on_ready() should be delayed to chunk all guilds
at start-up if necessary. This operation is incredibly slow for large
amounts of guilds. The default is True if Intents.members
is True.
allowed_mentions (Optional[AllowedMentions]) –
Control how the client handles mentions by default on every message sent.
heartbeat_timeout (float) – The maximum numbers of seconds before timing out and restarting the
WebSocket in the case of not receiving a HEARTBEAT_ACK. Useful if
processing the initial packets take too long to the point of disconnecting
you. The default timeout is 60 seconds.
assume_unsync_clock (bool) –
Whether to assume the system clock is unsynced. This applies to the ratelimit handling
code. If this is set to True, the default, then the library uses the time to reset
a rate limit bucket given by Discord. If this is False then your system clock is
used to calculate how long to sleep for. If this is set to False it is recommended to
sync your system clock to Google’s NTP server.
enable_debug_events (bool) –
Whether to enable events that are useful only for debugging gateway related information.
Right now this involves on_socket_raw_receive() and on_socket_raw_send(). If
this is False then those events will not be dispatched (due to performance considerations).
To enable these events, this must be set to True. Defaults to False.
sync_presence (Optional[bool]) –
Whether to keep presences up-to-date across clients.
The default behavior is True (what the SDK does).
enable_raw_presences (bool) –
Whether to manually enable or disable the on_raw_presence_update() event.
Setting this flag to True requires Intents.presences to be enabled.
By default, this flag is set to True only when Intents.presences is enabled and Intents.members
is disabled, otherwise it’s set to False.
http_trace (aiohttp.TraceConfig) –
The trace configuration to use for tracking HTTP requests the library does using aiohttp.
This allows you to check requests the library is using. For more information, check the
aiohttp documentation.
max_ratelimit_timeout (Optional[float]) –
The maximum number of seconds to wait when a non-global rate limit is encountered.
If a request requires sleeping for more than the seconds passed in, then
RateLimited will be raised. By default, there is no timeout limit.
In order to prevent misuse and unnecessary bans, the minimum value this can be
set to is 30.0 seconds.
connector (Optional[aiohttp.BaseConnector]) –
The aiohttp connector to use for this client. This can be used to control underlying aiohttp
behavior, such as setting a DNS resolver or sslcontext.
rpc (Optional[discord.rpc.Client]) –
The RPC client to upgrade from.