Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Telegram messages with markdown / HTML #230

Open
TowardMyth opened this issue Aug 2, 2021 · 1 comment
Open

Send Telegram messages with markdown / HTML #230

TowardMyth opened this issue Aug 2, 2021 · 1 comment

Comments

@TowardMyth
Copy link

Hi there. Thanks so much for developing this module.

For Telegram messages, is there any way to send messages with rich formatting in them, i.e. I can bold, italicize, etc?

Per here, the TG API supports this. https://stackoverflow.com/questions/38119481/send-bold-italic-text-on-telegram-bot-with-html.

Thanks!

@JoshKing56
Copy link

JoshKing56 commented Aug 18, 2021

Since the ntfy telegram backend uses the telegram_send library, this should be possible, as telegram_send supports the different styles of message, including HTML mode and Markdown mode. https://github.com/rahiel/telegram-send#usage

Calling the send() function with the option parse_mode=Markdown can accomplish this. The possible options (taken from the source code of telegram_send), is ["text", "markdown", "html"].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants