MessageReaction Class

Represents a reaction to a message.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Constructor

MessageReaction(*, type: Literal['like', 'heart', '1f440_eyes', '2705_whiteheavycheckmark', 'launch', '1f4cc_pushpin'] | str, createdDateTime: str | None = None, user: MessageUser | None = None, **extra_data: Any)

Keyword-Only Parameters

Name Description
type
Required
createdDateTime
Default value: None
user
Default value: None

Attributes

created_date_time

Timestamp of when the user reacted to the message.

created_date_time: str | None

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_config: ClassVar[ConfigDict] = {'alias_generator': AliasGenerator(alias=None, validation_alias=<staticmethod(<function CustomBaseModel.validation_alias_generator>)>, serialization_alias=<staticmethod(<function CustomBaseModel.serialization_alias_generator>)>), 'arbitrary_types_allowed': True, 'extra': 'allow', 'populate_by_name': True, 'serialize_by_alias': True, 'validate_by_alias': True, 'validate_by_name': True}

type

The type of reaction given to the message.

type: Literal['like', 'heart', '1f440_eyes', '2705_whiteheavycheckmark', 'launch', '1f4cc_pushpin'] | str

user

The user with which the reaction is associated.

user: MessageUser | None