Events relating to specific shards events.

Module Contents#

class hikari.events.shard_events.MemberChunkEvent[source]#

Bases: ShardEvent, Sequence[hikari.guilds.Member]

Event fired when a member chunk payload is received on a gateway shard.

chunk_count: int[source]#

Total number of expected chunks for the request this is associated with.

chunk_index: int[source]#

Zero-indexed position of this within the queued up chunks for this request.

members: Mapping[hikari.snowflakes.Snowflake, hikari.guilds.Member][source]#

Mapping of user IDs to the objects of the members in this chunk.

nonce: str | None[source]#

String nonce used to identify the request member chunks are associated with.

This is the nonce value passed while requesting member chunks or None if there was no nonce passed.

not_found: Sequence[hikari.snowflakes.Snowflake][source]#

Sequence of the snowflakes that were not found while making this request.

This is only applicable when user IDs are specified while making the member request the chunk is associated with.

presences: Mapping[hikari.snowflakes.Snowflake, hikari.presences.MemberPresence][source]#

Mapping of user IDs to found member presence objects.

This will be empty if no presences are found or include_presences is not passed as True while requesting the member chunks.

class hikari.events.shard_events.ShardConnectedEvent[source]#

Bases: ShardStateEvent

Event fired when a shard connects.

class hikari.events.shard_events.ShardDisconnectedEvent[source]#

Bases: ShardStateEvent

Event fired when a shard disconnects.

class hikari.events.shard_events.ShardEvent[source]#

Bases: hikari.events.base_events.Event, abc.ABC

Base class for any event that was shard-specific.

abstract property shard: hikari.api.shard.GatewayShard[source]#

Shard that received this event.

class hikari.events.shard_events.ShardPayloadEvent[source]#

Bases: ShardEvent

Event fired for most shard events with their raw payload.


This will only be dispatched for real dispatch events received from Discord and not artificial events like the ShardStateEvent events.

name: str[source]#

Name of the received event.

payload: Mapping[str, Any][source]#

The raw payload for this event.

class hikari.events.shard_events.ShardReadyEvent[source]#

Bases: ShardStateEvent

Event fired when a shard declares it is ready.

actual_gateway_version: int[source]#

Actual gateway version being used.

application_flags: hikari.applications.ApplicationFlags[source]#

Flags of the application this ready event is for.

application_id: hikari.snowflakes.Snowflake[source]#

ID of the application this ready event is for.

my_user: hikari.users.OwnUser[source]#

User for the current bot account this connection is authenticated with.

resume_gateway_url: str[source]#

The URL to use to when reconnecting to the gateway.

session_id: str[source]#

ID for this session.

unavailable_guilds: Sequence[hikari.snowflakes.Snowflake][source]#

Sequence of the IDs for all guilds this bot is currently in.

All guilds will start off “unavailable” and should become available after a few seconds of connecting one-by-one.

class hikari.events.shard_events.ShardResumedEvent[source]#

Bases: ShardStateEvent

Event fired when a shard resumes an existing session.

class hikari.events.shard_events.ShardStateEvent[source]#

Bases: ShardEvent, abc.ABC

Base class for any event concerning the state/connectivity of a shard.

This currently wraps connection/disconnection/ready/resumed events only.