hikari.events.typing_events
#
Events fired when users begin typing in channels.
DMTypingEvent #
Bases: TypingEvent
Event fired when a user starts typing in a guild channel.
app class-attribute
instance-attribute
#
App instance for this application.
channel_id class-attribute
instance-attribute
#
ID of the channel that this event concerns.
shard class-attribute
instance-attribute
#
shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})
Shard that received this event.
timestamp class-attribute
instance-attribute
#
Timestamp of when this typing event started.
user_id class-attribute
instance-attribute
#
ID of the user who triggered this typing event.
fetch_channel async
#
fetch_channel() -> DMChannel
Perform an API call to fetch an up-to-date image of this channel.
RETURNS | DESCRIPTION |
---|---|
DMChannel | The channel. |
RAISES | DESCRIPTION |
---|---|
UnauthorizedError | If you are unauthorized to make the request (invalid/missing token). |
ForbiddenError | If you are missing the |
NotFoundError | If the channel is not found. |
RateLimitTooLongError | Raised in the event that a rate limit occurs that is longer than |
RateLimitTooLongError | Raised in the event that a rate limit occurs that is longer than |
InternalServerError | If an internal error occurs on Discord while handling the request. |
GuildTypingEvent #
Bases: TypingEvent
Event fired when a user starts typing in a guild channel.
channel_id class-attribute
instance-attribute
#
ID of the channel that this event concerns.
guild_id class-attribute
instance-attribute
#
ID of the guild that this event relates to.
member class-attribute
instance-attribute
#
Object of the member who triggered this typing event.
shard class-attribute
instance-attribute
#
shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})
Shard that received this event.
timestamp class-attribute
instance-attribute
#
Timestamp of when this typing event started.
fetch_channel async
#
fetch_channel() -> TextableGuildChannel
Perform an API call to fetch an up-to-date image of this channel.
RETURNS | DESCRIPTION |
---|---|
TextableGuildChannel | The channel. |
fetch_guild async
#
fetch_guild() -> Guild
Perform an API call to fetch an up-to-date image of this guild.
RETURNS | DESCRIPTION |
---|---|
Guild | The guild. |
fetch_guild_preview async
#
fetch_guild_preview() -> GuildPreview
Perform an API call to fetch an up-to-date preview of this guild.
RETURNS | DESCRIPTION |
---|---|
GuildPreview | The guild. |
fetch_member async
#
fetch_member() -> Member
Perform an API call to fetch an up-to-date image of this event's member.
RETURNS | DESCRIPTION |
---|---|
Member | The member. |
get_channel #
get_channel() -> Optional[TextableGuildChannel]
Get the cached channel object this typing event occurred in.
RETURNS | DESCRIPTION |
---|---|
Optional[TextableGuildChannel] | The channel. |
get_guild #
get_guild() -> Optional[GatewayGuild]
Get the cached object of the guild this typing event occurred in.
If the guild is not found then this will return None
.
RETURNS | DESCRIPTION |
---|---|
Optional[GatewayGuild] | The object of the gateway guild if found else |
TypingEvent #
Bases: ShardEvent
, ABC
Base event fired when a user begins typing in a channel.
channel_id abstractmethod
property
#
channel_id: Snowflake
ID of the channel that this event concerns.
timestamp abstractmethod
property
#
timestamp: datetime
Timestamp of when this typing event started.
user_id abstractmethod
property
#
user_id: Snowflake
ID of the user who triggered this typing event.
fetch_channel async
#
fetch_channel() -> TextableChannel
Perform an API call to fetch an up-to-date image of this channel.
RETURNS | DESCRIPTION |
---|---|
TextableChannel | The channel. |
fetch_user async
#
fetch_user() -> User
Perform an API call to fetch an up-to-date image of this user.
RETURNS | DESCRIPTION |
---|---|
User | The user. |
RAISES | DESCRIPTION |
---|---|
UnauthorizedError | If you are unauthorized to make the request (invalid/missing token). |
NotFoundError | If the user is not found. |
RateLimitTooLongError | Raised in the event that a rate limit occurs that is longer than |
InternalServerError | If an internal error occurs on Discord while handling the request. |
get_user #
trigger_typing #
trigger_typing() -> TypingIndicator
Return a typing indicator for this channel that can be awaited.
RETURNS | DESCRIPTION |
---|---|
TypingIndicator | A typing indicator context manager and awaitable to trigger typing in a channel with. |