I am trying to send a colored text message to a user as reply, using sendMessage
with HTML parsing.
bot.sendMessage(update.message.chat_id, "<span style=\"color:blue\">foo</span>", telegram.ParseMode.HTML)
Sending <span style="color:blue">foo</span>
doesn't work, as span
is not supported:
Bad Request: Can't parse message text: Unsupported start tag "span" at byte offset 0 (400)
I am using the python-telegram-bot
v. 4.0.3.
Is there another way?
Select the text that you want to change. On the Home tab, in the Font group, choose the arrow next to Font Color, and then select a color.
Select Accessibility from the list of options. Under the heading, Display, select Text and display. This option may also be called Color and motion. Select Color Inversion from the list of options.
To change iMessage color using the Color Text Bubbles app: Launch the Messages app. Click on an existing conversation or click the New Message icon to start a new chat. Tap and hold on the row of apps just above the keyboard. Still touching the screen, swipe to the left until you see the Color Text Bubble app.
Using The Themes OptionGo to the Settings app. Find and tap on the Wallpapers and Themes option from the given choices. Go to Themes and select your desired theme. Based on the theme you choose, Android will change your font color.
Unfortunately there is no documentation about the tag accepted by the bot, except the unit test for parsemode.
The tags that work are b
, i
, a
for bold, italic and link elements, this is what is offered, maybe there's more but I couldn't find it in the docs
Your can enlight piece of text with grave character "`"
AAAA `
enlight piece
` BBB
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With