Open utterances-bot opened 1 year ago
Hi Ashik, Thanks for the article, this easily helps in creating one, Just one correction, in the example code we can avoid awaiting while sending notification as this will block the current execution in responding back to the client.
Thanks for the suggestions @bharathvaj-ganesan,
I mostly prefer blocking it since I mostly use it for critical cases but like you've mentioned notification may or may not be critical.
I'll make it explicit in the above snippet so that is is configurable :)
Edit: Just noticed, that I'm not performing any action so we can just return the promise and when we're calling it we can await it or not depending on our use case. Thanks again for flagging it.
Telegram Bot: How to Send Messages to Both Private and Group Chats
https://nesin.io/blog/telegram-bot-send-message