From 45873b153c7c3f9dcc4f79b645ffcc90491180f6 Mon Sep 17 00:00:00 2001 From: Shrimadhav U K Date: Tue, 25 Jan 2022 04:36:11 +0530 Subject: [PATCH] urcf --- telethon/types/_custom/message.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/telethon/types/_custom/message.py b/telethon/types/_custom/message.py index e1bfff41..d0db2220 100644 --- a/telethon/types/_custom/message.py +++ b/telethon/types/_custom/message.py @@ -1264,6 +1264,17 @@ class Message(ChatGetter, SenderGetter): return await self._client.unpin_message( await self.get_input_chat(), self.id) + async def react(self, reaction=None): + # TODO Constantly checking if client is a bit annoying, + # maybe just make it illegal to call messages from raw API? + # That or figure out a way to always set it directly. + if self._client: + return await self._client.send_reaction( + await self.get_input_chat(), + self.id, + reaction + ) + # endregion Public Methods # region Private Methods