yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.3k stars 1.5k forks source link

Long variable don't set style parse mode #1025

Closed LuciaLux closed 1 year ago

LuciaLux commented 1 year ago

i have a variable in my app : var true_match = "\n" + ' 🔴 METODO ' + "\n" + '⚽️ ' + event + "\n" + '⏰ ' + hours + "\n" + '📈 ' + teams + "\n" what I would like is to set some of these words in bold and others in italics. I tried all the methods from the documentation but they don't work for me.

If I send a single sentence like this, everything works

bot.sendMessage(chatId, '<b>TEST</b>', {parse_mode: 'HTML'});

how can i solve?

danielperez9430 commented 1 year ago

Maybe you have some characters that you are forgetting to extract from those variables. But we need more context to help you. In the "true_match" you only have a line returns "/n", but I don't see any html tags for the format... so no idea without more information