hikari.sessions#

Entities directly related to creating and managing gateway shard sessions.

Module Contents#

class hikari.sessions.GatewayBotInfo[source]#

Used to represent gateway information for the connected bot.

session_start_limit: SessionStartLimit[source]#

Information about the bot’s current session start limit.

shard_count: int[source]#

The recommended number of shards to use when connecting to the gateway.

url: str[source]#

The WSS URL that can be used for connecting to the gateway.

class hikari.sessions.SessionStartLimit[source]#

Used to represent information about the current session start limits.

property reset_at: datetime.datetime[source]#

Return the approximate time that the IDENTIFY limit resets at.

property used: int[source]#

Return how many times you have sent an IDENTIFY in the window.

max_concurrency: int[source]#

Maximum connection concurrency.

This defines how many shards can be started at once within a 5 second window. For most bots, this will always be 1, but for very large bots, this may be increased to reduce startup times. Contact Discord for more information.

remaining: int[source]#

The remaining number of session starts this bot has.

reset_after: datetime.timedelta[source]#

When SessionStartLimit.remaining will reset for the current bot.

After it resets it will be set to SessionStartLimit.total.

total: int[source]#

The total number of session starts the current bot is allowed.