From e1e6e4bd70a90721785585d1abe2ac5805d598b1 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 27 May 2018 20:24:42 +0200 Subject: [PATCH] Make send_message recognise the Empty parse mode --- pyrogram/client/methods/messages/send_message.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/methods/messages/send_message.py b/pyrogram/client/methods/messages/send_message.py index 44acaa2e..c6a459ab 100644 --- a/pyrogram/client/methods/messages/send_message.py +++ b/pyrogram/client/methods/messages/send_message.py @@ -19,6 +19,7 @@ from pyrogram.api import functions, types from pyrogram.client import types as pyrogram_types from ...ext import utils, BaseClient +from ...style import Empty class SendMessage(BaseClient): @@ -67,7 +68,13 @@ class SendMessage(BaseClient): Raises: :class:`Error ` """ - style = self.html if parse_mode.lower() == "html" else self.markdown + parse_mode = parse_mode.lower() + + style = ( + Empty if parse_mode == "empty" + else self.html if parse_mode == "html" + else self.markdown + ) r = self.send( functions.messages.SendMessage(