From e5a448118a488c5dee6767f1785aca55110e741f Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Sun, 8 Oct 2017 16:31:36 +0200 Subject: [PATCH] Parsing HTML --- run.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/run.py b/run.py index 8d4c952..2a8ad46 100644 --- a/run.py +++ b/run.py @@ -94,12 +94,12 @@ def dogetip(bot, update, args): txid = response['data']['txid'] - message = "🚀 Transaction effectuée 🚀\n\n" \ - + str(montant) + " " + NETWORK + "\n" \ - + update.message.from_user.username + " → " + destinataire + "\n\n" \ - + "[Voir la transaction](https://chain.so/tx/" + NETWORK + "/" + txid + ")" + message = '🚀 Transaction effectuée 🚀\n\n' \ + + str(montant) + ' ' + NETWORK + '\n' \ + + '@' + update.message.from_user.username + ' → @' + destinataire + '\n\n' \ + + 'Voir la transaction' - bot.send_message(chat_id=update.message.chat_id, parse_mode=ParseMode.MARKDOWN, text=message) + bot.send_message(chat_id=update.message.chat_id, parse_mode=ParseMode.HTML, text=message) def register(bot, update): try: @@ -131,7 +131,7 @@ def withdraw(bot, update, args): bot.send_message(chat_id=update.message.chat_id, parse_mode=ParseMode.MARKDOWN, text="Transaction effectuée !\n [tx](https://chain.so/tx/" + NETWORK + "/" + txid + ")") def testing(bot, update): - bot.send_message(chat_id=update.message.chat_id, parse_mode=ParseMode.MARKDOWN, text="Bonjour V_IAL") + bot.send_message(chat_id=update.message.chat_id, parse_mode=ParseMode.MARKDOWN, text="Bonjour @V_IAL") # Telegram initialisation