1

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?

Ruli
  • 2,592
  • 12
  • 30
  • 40
vantabeam
  • 45
  • 1
  • 6

0 Answers0