diff --git a/telethon/events/chataction.py b/telethon/events/chataction.py index 582e3dd2..132f2782 100644 --- a/telethon/events/chataction.py +++ b/telethon/events/chataction.py @@ -171,7 +171,7 @@ class ChatAction(EventBuilder): ``entity`` already set. """ return await self._client.send_message( - await self.input_chat, *args, **kwargs) + await self.get_input_chat(), *args, **kwargs) async def reply(self, *args, **kwargs): """ @@ -186,7 +186,7 @@ class ChatAction(EventBuilder): kwargs['reply_to'] = self.action_message.id return await self._client.send_message( - await self.input_chat, *args, **kwargs) + await self.get_input_chat(), *args, **kwargs) async def delete(self, *args, **kwargs): """ @@ -202,7 +202,9 @@ class ChatAction(EventBuilder): return return await self._client.delete_messages( - await self.input_chat, [self.action_message], *args, **kwargs) + await self.get_input_chat(), [self.action_message], + *args, **kwargs + ) async def get_pinned_message(self): """ @@ -212,7 +214,8 @@ class ChatAction(EventBuilder): if self._pinned_message == 0: return None - if isinstance(self._pinned_message, int) and await self.input_chat: + if isinstance(self._pinned_message, int)\ + and await self.get_input_chat(): r = await self._client(functions.channels.GetMessagesRequest( self._input_chat, [self._pinned_message] )) diff --git a/telethon/events/messageread.py b/telethon/events/messageread.py index ac729681..b154632e 100644 --- a/telethon/events/messageread.py +++ b/telethon/events/messageread.py @@ -97,7 +97,7 @@ class MessageRead(EventBuilder): was read instead checking if it's in here. """ if self._messages is None: - chat = await self.input_chat + chat = await self.get_input_chat() if not chat: self._messages = [] else: diff --git a/telethon/tl/custom/message.py b/telethon/tl/custom/message.py index 8e069300..3f7bc6e0 100644 --- a/telethon/tl/custom/message.py +++ b/telethon/tl/custom/message.py @@ -675,7 +675,7 @@ class Message: if sum(int(x is not None) for x in (i, text, filter)) >= 2: raise ValueError('You can only set either of i, text or filter') - if not await self.buttons: + if not await self.get_buttons(): return # Accessing the property sets self._buttons[_flat] if text is not None: