hikari.events.shard_events
#
Events relating to specific shards events.
MemberChunkEvent
#
Bases: ShardEvent
, Sequence['guilds.Member']
Event fired when a member chunk payload is received on a gateway shard.
app
class-attribute
instance-attribute
#
App instance for this application.
chunk_count
class-attribute
instance-attribute
#
Total number of expected chunks for the request this is associated with.
chunk_index
class-attribute
instance-attribute
#
Zero-indexed position of this within the queued up chunks for this request.
members
class-attribute
instance-attribute
#
Mapping of user IDs to the objects of the members in this chunk.
nonce
class-attribute
instance-attribute
#
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
class-attribute
instance-attribute
#
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
class-attribute
instance-attribute
#
presences: Mapping[Snowflake, MemberPresence] = field(repr=False)
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.
shard
class-attribute
instance-attribute
#
shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})
Shard that received this event.
ShardConnectedEvent
#
Bases: ShardStateEvent
Event fired when a shard successfully connects.
app
class-attribute
instance-attribute
#
App instance for this application.
shard
class-attribute
instance-attribute
#
shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})
Shard that received this event.
ShardDisconnectedEvent
#
Bases: ShardStateEvent
Event fired when a shard disconnects.
app
class-attribute
instance-attribute
#
App instance for this application.
shard
class-attribute
instance-attribute
#
shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})
Shard that received this event.
ShardEvent
#
Base class for any event that was shard-specific.
ShardPayloadEvent
#
Bases: ShardEvent
Event fired for most shard events with their raw payload.
Note
This will only be dispatched for real dispatch events received from
Discord and not artificial events like the hikari.events.shard_events.ShardStateEvent
events.
app
class-attribute
instance-attribute
#
App instance for this application.
payload
class-attribute
instance-attribute
#
The raw payload for this event.
shard
class-attribute
instance-attribute
#
shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})
Shard that received this event.
ShardReadyEvent
#
Bases: ShardStateEvent
Event fired when a shard declares it is ready.
actual_gateway_version
class-attribute
instance-attribute
#
Actual gateway version being used.
application_flags
class-attribute
instance-attribute
#
application_flags: ApplicationFlags = field(repr=True)
Flags of the application this ready event is for.
application_id
class-attribute
instance-attribute
#
ID of the application this ready event is for.
my_user
class-attribute
instance-attribute
#
User for the current bot account this connection is authenticated with.
resume_gateway_url
class-attribute
instance-attribute
#
The URL to use to when reconnecting to the gateway.
session_id
class-attribute
instance-attribute
#
ID for this session.
shard
class-attribute
instance-attribute
#
shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})
Shard that received this event.
unavailable_guilds
class-attribute
instance-attribute
#
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.
ShardResumedEvent
#
Bases: ShardStateEvent
Event fired when a shard resumes an existing session.
app
class-attribute
instance-attribute
#
App instance for this application.
shard
class-attribute
instance-attribute
#
shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})
Shard that received this event.
ShardStateEvent
#
Bases: ShardEvent
, ABC
Base class for any event concerning the state/connectivity of a shard.
This currently wraps connection/disconnection/ready/resumed events only.