Skip to content

Reaction Events

Note

The following classes come from the scurrypy.events.reaction_events module.


ReactionAddEvent dataclass

Bases: Event, DataModel

Reaction added event.

type: int instance-attribute

Type of reaction added.

user_id: int instance-attribute

ID of user who added the emoji.

emoji: EmojiModel instance-attribute

Emoji used to react.

channel_id: int instance-attribute

ID of the channel where the reaction took place.

message_id: int instance-attribute

ID of the message where the reaction took place.

guild_id: Optional[int] instance-attribute

ID of the guild where the reaction took place (if in a guild).

burst: bool instance-attribute

Whether the emoji is super.

member: Optional[GuildMemberModel] instance-attribute

Partial member object of the guild member that added the emoji (if in a guild).

message_author_id: Optional[int] instance-attribute

ID of the user who sent the message where the reaction was added.

name: str instance-attribute

Dispatch name of event.

raw: dict instance-attribute

Event's raw JSON payload. NOT A DATACLASS.

to_dict

Recursively turns the dataclass into a dictionary and drops empty fields.

Returns:

  • dict

    serialized dataclasss


ReactionRemoveEvent dataclass

Bases: Event, DataModel

Reaction removed event.

type: int instance-attribute

Type of reaction removed.

user_id: int instance-attribute

ID of user who removed their reaction.

emoji: EmojiModel instance-attribute

Emoji data of the emoji where the reaction was removed.

channel_id: int instance-attribute

ID of the channel where the reaction was removed.

message_id: int instance-attribute

ID of the message where the reaction was removed.

guild_id: Optional[int] instance-attribute

ID of the guild where the reaction was removed (if in a guild).

burst: bool instance-attribute

If the emoji of the removed reaction is super.

name: str instance-attribute

Dispatch name of event.

raw: dict instance-attribute

Event's raw JSON payload. NOT A DATACLASS.

to_dict

Recursively turns the dataclass into a dictionary and drops empty fields.

Returns:

  • dict

    serialized dataclasss


ReactionRemoveAllEvent dataclass

Bases: Event, DataModel

Remove all reactions event.

channel_id: int instance-attribute

ID of the channel where all reaction were removed.

message_id: int instance-attribute

ID of the message where all reaction were removed.

guild_id: Optional[int] instance-attribute

ID of the guild where all reaction were removed (if in a guild).

name: str instance-attribute

Dispatch name of event.

raw: dict instance-attribute

Event's raw JSON payload. NOT A DATACLASS.

to_dict

Recursively turns the dataclass into a dictionary and drops empty fields.

Returns:

  • dict

    serialized dataclasss


ReactionRemoveEmojiEvent dataclass

Bases: Event, DataModel

All reactions of a specific emoji removed.

emoji: EmojiModel instance-attribute

Emoji data of the removed reaction emoji.

channel_id: int instance-attribute

ID of the channel where the reaction emoji was removed.

message_id: int instance-attribute

ID of the message where the reaction emoji was removed.

guild_id: Optional[int] instance-attribute

ID of the guild where the reaction emoji was removed. (if in a guild)

name: str instance-attribute

Dispatch name of event.

raw: dict instance-attribute

Event's raw JSON payload. NOT A DATACLASS.

to_dict

Recursively turns the dataclass into a dictionary and drops empty fields.

Returns:

  • dict

    serialized dataclasss


ReactionType

Reaction types.

NORMAL = 0 class-attribute instance-attribute

A standard emoji.

BURST = 1 class-attribute instance-attribute

A super emoji.