-
Notifications
You must be signed in to change notification settings - Fork 42
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
error on help command (and workaround) #57
Comments
got the same error, calling the bot by botname or @botName too [Mon Jan 23 2017 06:26:39 GMT+0000 (GMT)] ERROR Error: Bad Request: Can't parse message text: Can't find end of the entity starting at byte offset 483 [Mon Jan 23 2017 06:26:39 GMT+0000 (GMT)] ERROR hubot-bangbang: DOES NOT COMPUTE [Mon Jan 23 2017 06:27:45 GMT+0000 (GMT)] ERROR hubot-bangbang: DOES NOT COMPUTE |
Ok strange, I will try to look at this asap, thx guys for reporting it 👍 |
Hi, same problem here, or similar at least, on my tests it's seems has something to do with the markdown support in the messages and underscores (_) ie:
Notice the underscore in the msg. Thanks, salud! |
Forgot to say, I've markdown formated responses that work just fine, the problem appears with "unclosed" markdown ie: " |
any progress? still failing on my side even with the workaround |
Hm works with help but not better-help |
I have the same issue with hubot-better-help |
The issue is definitely the unclosed underscore. curl -XPOST -H 'content-type: application/json' https://api.telegram.org/$TELEGRAM_TOKEN/sendMessage -d @/tmp/test.json contents of /tmp/test.json should be {
"chat_id": 344335405,
"text": "This unmatched_underscore breaks telegram markdown parsing",
"reply_to_message_id": 8,
"parse_mode": "Markdown"
} response: {"ok":false,"error_code":400,"description":"Bad Request: can't parse entities in message text: Can't find end of the entity starting at byte offset 14"} I'm asking telegram bot help about this, I'll let you know what they say. Other markdown parsers that I've used will just leave a literal underscore when there's no second, closing underscore. And in fact that's how it works if you write an underscore in the web client, so I don't see why it should work differently for the bot API. |
@gburgett Any update on this, I see the problem is persisting. |
@surfer190 this was the latest info that I have from two years ago: CruAlbania/hubot-better-help#3 You could repeat the curl command above and test whether their markdown parsing is still broken. |
@gburgett Yes, same response.
returns:
|
Hello,
I've encountered the same problem as #41. I almost gave up on the idea to make hubot work with telegram but accidentally found a workaround.
If the bot name has an underscore in it, then the help command doesn't work (but all other commands work fine). See the debug log below.
All Telegram bots have _bot in the end of their names. Also if you want to address the bot in the group chat, its (hubot) name must be the same as Telegram bot name. And here is the problem, underscore characters in the name makes the help command fail.
The workaround I found is to have the (hubot) name without underscore and provide a convenient alias for addressing the bot from the chat. For example, use / character as alias, start the hubot like this
and in the group chat type
/command
instead of@botname command
I hope this helps.
My setup:
Debug log showing unsuccessful help and successful ping commands:
The text was updated successfully, but these errors were encountered: