From 4958ae4c1d97ee1fcf9d45df3b98f975402cdc63 Mon Sep 17 00:00:00 2001 From: PeterLaemmle Date: Mon, 28 Sep 2020 20:54:34 +0200 Subject: [PATCH] Update Telegram.py Set message parse mode to HTML to allow a number of formatting options like bold and italic. See https://core.telegram.org/bots/api#formatting-options for full details. --- plugins/Telegram/Telegram.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Telegram/Telegram.py b/plugins/Telegram/Telegram.py index 2120d75..837aea0 100644 --- a/plugins/Telegram/Telegram.py +++ b/plugins/Telegram/Telegram.py @@ -94,7 +94,7 @@ def run(typ,freq,data): bot = telegram.Bot(token='%s' % BOTTokenAPIKey) # Send message to chat via Telegram BOT API logging.debug("Send message to chat via Telegram BOT API") - bot.sendMessage('%s' % BOTChatIDAPIKey, text) + bot.sendMessage('%s' % BOTChatIDAPIKey, text, parse_mode=telegram.ParseMode.HTML) # Generate location information only for specific RIC if typ == "POC" and data["ric"] == RICforLocationAPIKey: