Markdown2 of Telegram bot isn't working with python

Viewed 362

I'd like to send the message using telegram bot using python.
It contains a password and I want to copy and paste it automatically if I push it.
I use MarkDown parse_mode as below.

bot.sendMessage(parameters.chat_id, text = "pw: "+"```"+ password+ "```", parse_mode='MarkdownV2')

It worked good, as expected.
However, I want to send longer message with lots of variables like this.

bot.sendMessage(parameters.chat_id, text = category+ "  "+ title+ '\n'+ 
                "name: "+ name+ '\n'+ link+'\n'+ "url: "+ url+ "pw: "+"```"+ 
                password+ "```"+ '\n'+ text, parse_mode='MarkdownV2')

But in this case, the bot doesn't send any messages. What should I fix?

0 Answers
Related