From 383ab9b0b26cf456782283b18d46a0697d5cb6a5 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Mon, 20 May 2019 11:56:50 +0200 Subject: [PATCH] Fix message.text not checking if parse_mode was set --- telethon/tl/custom/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/tl/custom/message.py b/telethon/tl/custom/message.py index 6526235c..6f536727 100644 --- a/telethon/tl/custom/message.py +++ b/telethon/tl/custom/message.py @@ -268,7 +268,7 @@ class Message(ChatGetter, SenderGetter, TLObject, abc.ABC): The message text, formatted using the client's default parse mode. Will be ``None`` for :tl:`MessageService`. """ - if self._text is None and self._client: + if self._text is None and self._client and self._client.parse_mode: self._text = self._client.parse_mode.unparse( self.message, self.entities)