Formatting #1627
-
Hello. I have a simple telegram bot. There is a group to which I write messages, and the bot takes these messages from the channel and copies them into itself. If I write a message to the channel in bold text or any formatting available, the bot repeats itself without formatting. How can I implement it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Copy the entities, like this bot.on('message', ctx => {
const { entities, text } = ctx.message
ctx.reply(text, {
entities,
parse_mode: 'Markdown' // use the same parse_mode that you used in the original message
})
}) |
Beta Was this translation helpful? Give feedback.
-
Does it work? I am trying the same solutions in Telegraf version ^4.9.2 but it does not work. I am unable to get to use the entities when I copy a message |
Beta Was this translation helpful? Give feedback.
Copy the entities, like this