0

How can I make text bold within a Monospace text block while sending Telegram messages?

I want to send tables from my bot. I tried html tables but this doesn't work in mobile view, so in Python I do this:

msg = ""
for row in table:
    msg += "`|{}|{}|*{}*|`\n".format(row[0].rjust(16, ' '), row[1].rjust(20, ' '), row[2].rjust(20, ' '))
    
bot_send_msg(msg)

However I can do either the backticks for monospace or make the last column bold. If I use monospace the '*' are just displayed as asterix.

I've seen this link and tried 1,2 and 3 backticks and asterixm but it's all the same.

user3605780
  • 6,542
  • 13
  • 42
  • 67

1 Answers1

1

Telegram does not support combining bold or italic with monospace.

You can check this yourself by trying different combinations directly in your client. It is possible to make italic text bold, but making it monospace gives you just monospace.

You can combine monospace with strikethrough, but this is probably the only exception.

Roj
  • 995
  • 1
  • 8
  • 22