Skip to content


Entities directly related to creating and managing gateway shard sessions.

GatewayBotInfo #

Used to represent gateway information for the connected bot.

session_start_limit class-attribute instance-attribute #

session_start_limit: SessionStartLimit = field(repr=True)

Information about the bot's current session start limit.

shard_count class-attribute instance-attribute #

shard_count: int = field(repr=True)

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

url class-attribute instance-attribute #

url: str = field(repr=True)

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

SessionStartLimit #

Used to represent information about the current session start limits.

max_concurrency class-attribute instance-attribute #

max_concurrency: int = field(repr=True)

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 class-attribute instance-attribute #

remaining: int = field(repr=True)

The remaining number of session starts this bot has.

reset_after class-attribute instance-attribute #

reset_after: timedelta = field(repr=True)

When hikari.sessions.SessionStartLimit.remaining will reset for the current bot.

After it resets it will be set to

reset_at property #

reset_at: datetime

Return the approximate time that the IDENTIFY limit resets at.

total class-attribute instance-attribute #

total: int = field(repr=True)

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

used property #

used: int

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