hikari.events.reaction_events#

Events that fire if messages are reacted to.

Module Contents#

class hikari.events.reaction_events.ReactionEvent[source]#

Bases: hikari.events.shard_events.ShardEvent, abc.ABC

Event base for any message reaction event.

abstract property channel_id: hikari.snowflakes.Snowflake[source]#

ID of the channel that this event concerns.

abstract property message_id: hikari.snowflakes.Snowflake[source]#

ID of the message that this event concerns.

class hikari.events.reaction_events.GuildReactionEvent[source]#

Bases: ReactionEvent, abc.ABC

Event base for any reaction-bound event in guild messages.

abstract property guild_id: hikari.snowflakes.Snowflake[source]#

ID of the guild that this event concerns.

class hikari.events.reaction_events.DMReactionEvent[source]#

Bases: ReactionEvent, abc.ABC

Event base for any reaction-bound event in private messages.

class hikari.events.reaction_events.ReactionAddEvent[source]#

Bases: ReactionEvent, abc.ABC

Event base for any reaction that is added to a message.

abstract property user_id: hikari.snowflakes.Snowflake[source]#

ID of the user that added this reaction.

abstract property emoji_name: Union[hikari.emojis.UnicodeEmoji, str, None][source]#

Name of the emoji which was added if known.

This can either be the string name of the custom emoji which was added, the object of the hikari.emojis.UnicodeEmoji which was added or None when the relevant custom emoji’s data is not available (e.g. the emoji has been deleted).

abstract property emoji_id: Optional[hikari.snowflakes.Snowflake][source]#

ID of the emoji which was added if it is custom, else None.

abstract property is_animated: bool[source]#

Whether the emoji which was added is animated.

is_for_emoji(emoji, /)[source]#

Get whether the reaction event is for a specific emoji.

Parameters
emojityping.Union[hikari.emojis.Emoji, str]

The emoji to check.

Passing str here indicates a unicode emoji.

Returns
bool

Whether the emoji is the one which was added.

class hikari.events.reaction_events.ReactionDeleteEvent[source]#

Bases: ReactionEvent, abc.ABC

Event base for any single reaction that is removed from a message.

abstract property user_id: hikari.snowflakes.Snowflake[source]#

User ID for the user that added this reaction initially.

abstract property emoji_name: Union[hikari.emojis.UnicodeEmoji, str, None][source]#

Name of the emoji which was removed.

Either the string name of the custom emoji which was removed, the object of the hikari.emojis.UnicodeEmoji which was removed or None when the relevant custom emoji’s data is not available (e.g. the emoji has been deleted).

abstract property emoji_id: Optional[hikari.snowflakes.Snowflake][source]#

ID of the emoji which was added if it is custom, else None.

is_for_emoji(emoji, /)[source]#

Get whether the reaction event is for a specific emoji.

Parameters
emojityping.Union[hikari.emojis.Emoji, str]

The emoji to check.

Passing str here indicates a unicode emoji.

Returns
bool

Whether the emoji is the one which was removed.

class hikari.events.reaction_events.ReactionDeleteAllEvent[source]#

Bases: ReactionEvent, abc.ABC

Event base fired when all reactions are removed from a message.

class hikari.events.reaction_events.ReactionDeleteEmojiEvent[source]#

Bases: ReactionEvent, abc.ABC

Event base fired when all reactions are removed for one emoji.

abstract property emoji_name: Union[hikari.emojis.UnicodeEmoji, str, None][source]#

Name of the emoji which was removed.

Either the string name of the custom emoji which was removed, the object of the hikari.emojis.UnicodeEmoji which was removed or None when the relevant custom emoji’s data is not available (e.g. the emoji has been deleted).

abstract property emoji_id: Optional[hikari.snowflakes.Snowflake][source]#

ID of the emoji which was added if it is custom, else None.

is_for_emoji(emoji, /)[source]#

Get whether the reaction event is for a specific emoji.

Parameters
emojityping.Union[hikari.emojis.Emoji, str]

The emoji to check.

Passing str here indicates a unicode emoji.

Returns
bool

Whether the emoji is the one which was removed.

class hikari.events.reaction_events.GuildReactionAddEvent[source]#

Bases: GuildReactionEvent, ReactionAddEvent

Event fired when a reaction is added to a guild message.

property guild_id: hikari.snowflakes.Snowflake[source]#

ID of the guild that this event concerns.

property user_id: hikari.snowflakes.Snowflake[source]#

ID of the user that added this reaction.

member: hikari.guilds.Member[source]#

Member that added the reaction.

class hikari.events.reaction_events.GuildReactionDeleteEvent[source]#

Bases: GuildReactionEvent, ReactionDeleteEvent

Event fired when a reaction is removed from a guild message.

class hikari.events.reaction_events.GuildReactionDeleteEmojiEvent[source]#

Bases: GuildReactionEvent, ReactionDeleteEmojiEvent

Event fired when an emoji is removed from a guild message’s reactions.

class hikari.events.reaction_events.GuildReactionDeleteAllEvent[source]#

Bases: GuildReactionEvent, ReactionDeleteAllEvent

Event fired when all of a guild message’s reactions are removed.

class hikari.events.reaction_events.DMReactionAddEvent[source]#

Bases: DMReactionEvent, ReactionAddEvent

Event fired when a reaction is added to a private message.

class hikari.events.reaction_events.DMReactionDeleteEvent[source]#

Bases: DMReactionEvent, ReactionDeleteEvent

Event fired when a reaction is removed from a private message.

class hikari.events.reaction_events.DMReactionDeleteEmojiEvent[source]#

Bases: DMReactionEvent, ReactionDeleteEmojiEvent

Event fired when an emoji is removed from a private message’s reactions.

class hikari.events.reaction_events.DMReactionDeleteAllEvent[source]#

Bases: DMReactionEvent, ReactionDeleteAllEvent

Event fired when all of a private message’s reactions are removed.