question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Telegram channel markdown syntax problem

See original GitHub issue

Rasa version: rasa 1.0.9 rasa-core 0.13.7 rasa-core-sdk 0.13.0 rasa-sdk 1.0.0

Rasa X version (if used & relevant): rasa-x 0.19.0

Python version: Python 3.6.8

Operating system (windows, osx, …): Windows 10

Issue: Seems default telegram connector doesn’t support markdown syntax

Command OR request that led to error:

  1. Add to action.py or domain.yml text with url in markdown syntax
  2. Check your action/template in bot

Result: You: test Bot: test link: [test](https://rasa.com/)

Expected result: You: test Bot: test link: test

Content of configuration file (actions.py) (if relevant):

dispatcher.utter_message('test link: [test](https://rasa.com/')

Content of domain file (domain.yml) (if relevant):

  utter_test_url:
    - text: "test link: [test](https://rasa.com/)"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
erohmensingcommented, Jun 28, 2019

@selphe it’s possible that the change to self.send_message(recipient_id, message_part, **kwargs) will be default, we’ll have to think about how this would affect the channels we already have. If we did change that then we could set the default to markdown because you could still pass HTML by declaring it.

However, as I said, i’m wary about doing that because of other channels ending up failing with got unexpected keyword argument "parse_mode".

If you’d like to customize your text message, perhaps an even better workaround is using custom output payloads to specify your api call directly. E.g.

utter_test_url:
    - custom: 
       text: "test link: [test](https://rasa.com/)"
       parse_mode: markdown

or via

dispatcher.utter_custom_json('test link: [test](https://rasa.com/', parse_mode='markdown')
0reactions
erohmensingcommented, Jun 28, 2019

Sorry, of course, thanks for the fix! Yes it’s a json payload so it definitely needs to be everything inside the curly braces as you have it. 🙂 was a little late for me 😅 glad you are able to customize the message without changing the source code. That’s why we added the custom functionality in the first place! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I turn on markdown mode in Telegram? - Stack Overflow
Today I found that in the Telegram desktop client I can add a hyperlink pressing Ctrl-K (or through popup menu by RightClick)! It's...
Read more >
Telegram Bot channel Markdown support | Sinch
Markdown syntax can be used in the text, title, or description fields of outbound text, choice, or card messages sent on the Telegram...
Read more >
Working with Issues and Articles in Telegram - JetBrains
Open the menu for the YouTrack bot and select the /comment slash command. · Type the ID of the issue or article where...
Read more >
telegram markdown - Code Examples & Solutions For This ...
telegram markdown. Add Answer | View In TPC Matrix. Technical Problem Cluster First Answered On December 26, 2020 Popularity ... telegram markdown syntax....
Read more >
Telegram Text Formatting: Tips, Font Tricks, and Shortcuts
How to change the font style in Telegram with Markdown bot ... online payments and turn your chatbot into an effective sales channel....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found