diff --git a/pywa/types/others.py b/pywa/types/others.py index 823389cd..76e46b85 100644 --- a/pywa/types/others.py +++ b/pywa/types/others.py @@ -101,6 +101,10 @@ class Reaction(utils.FromDict): message_id: str emoji: str | None = None + @classmethod + def from_dict(cls, data: dict, **kwargs) -> Reaction: + return cls(message_id=data["message_id"], emoji=data["emoji"] or None) + @dataclasses.dataclass(frozen=True, slots=True) class Location(utils.FromDict):