How to handle unsupported commands?
See original GitHub issueI am using webhooks with Koa as mentioned in examples. But on unsupported commands, Telegraph is returning back with 404 Not Found
which makes telegram keep retrying. I want to rather reply with a message saying that this command is not supported. Is there an existing way to do that?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
How to handle unsupported commands? · Issue #53 - GitHub
Hi,. is there a way to handle all unsupported commands? Suppose I have: const menu = new TelegrafInlineMenu(ctx => ctx.i18n.t('welcomeMsg', { ...
Read more >How to handle unsupported system commands in Python?
I would like to ask if there is any solution to handle unsupported system command in Python. E.g.:
Read more >Unsupported Commands in Cisco IOS Release 12.2(50)SE
The unsupported commands are listed by software feature and command mode. Access Control Lists. Unsupported Privileged EXEC Commands.
Read more >Unsupported Commands in Atlas - MongoDB
If you use an unsupported command or invalid syntax, Atlas returns the following error message: <$command> is not allowed or the syntax is...
Read more >You are using an unsupported command-line flag - Abode QA
“You are using an unsupported command-line flag –ignore-certificate-errors. Stability and security will suffer.” Handling in WebDriver using ChromeOptions() · “ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It works well with text messages. What I meant was other kinds of interactions like sending media or locations. I assumed that
text
would only set the default for text messages. Other messages like media would still receive 400 since no defaults are found and henceTelegram
would keep retrying.I should have just checked first instead of assuming that and asking, sorry for that 😦 Anyways, I have tried it and verified that
sets default for all kinds of messages.
I will go ahead and close this. Thank you 🙂
I am not sure how/if this works with Koa but in Node.js you can listen all unhandled messages like this:
If you only want this for commands you can look if the first letter of the message is a
/