Formatting #1627
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.
Answered by
hypernova7
May 24, 2022
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.
3 replies
Answer selected by
Jexly0x
-
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.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Copy the entities, like this