hikari.events.shard_events#
Events relating to specific shards events.
ChannelInfo #
Ephemeral information for a channel in a guild.
This is sent as part of a hikari.events.shard_events.ChannelInfoEvent.
ChannelInfoEvent #
Bases: ShardEvent
Event fired when a channel info payload is received on a gateway shard.
This is sent in response to hikari.api.shard.GatewayShard.request_channel_info.
app class-attribute instance-attribute #
App instance for this application.
channels class-attribute instance-attribute #
channels: Mapping[Snowflake, ChannelInfo] = attrs.field(
repr=False
)
Mapping of channel IDs to the ephemeral information of the guild's channels.
guild_id class-attribute instance-attribute #
ID of the guild this event is for.
shard class-attribute instance-attribute #
shard: GatewayShard = attrs.field(
metadata={attrs_extensions.SKIP_DEEP_COPY: True}
)
Shard that received this event.
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] = attrs.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 = attrs.field(
metadata={attrs_extensions.SKIP_DEEP_COPY: True}
)
Shard that received this event.
RequestGuildMembersRateLimitedEvent #
Bases: ShardRateLimitedEvent
Event fired when requesting guild members is rate limited on a shard.
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 = attrs.field(
metadata={attrs_extensions.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 = attrs.field(
metadata={attrs_extensions.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 = attrs.field(
metadata={attrs_extensions.SKIP_DEEP_COPY: True}
)
Shard that received this event.
ShardRateLimitedEvent #
Bases: ShardEvent
Event fired when a gateway operation is rate limited on a shard.
app class-attribute instance-attribute #
App instance for this application.
meta class-attribute instance-attribute #
The raw metadata for the operation that was rate limited.
opcode class-attribute instance-attribute #
Opcode of the gateway operation that was rate limited.
retry_after class-attribute instance-attribute #
How many seconds to wait before the operation can be retried.
shard class-attribute instance-attribute #
shard: GatewayShard = attrs.field(
metadata={attrs_extensions.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 = attrs.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 = attrs.field(
metadata={attrs_extensions.SKIP_DEEP_COPY: True}
)
Shard that received this event.
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 = attrs.field(
metadata={attrs_extensions.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.