I want to use the node-telegram-api for sending notifications from my admin panel (of a nodejs project).
I've read trough all of the docs but I couldn't find out the most efficient way to send messages without polling all time.
Should I use code like
var sendNotification = function(message){
bot.start();
var notification = new Message().text(message).to(adminChatID);
bot.send(notification);
bot.stop();
}
or is there a way to start the bot at the beginning and just stop polling updates?
Or can I simply send messages without starting?
Hey there,
I want to use the node-telegram-api for sending notifications from my admin panel (of a nodejs project). I've read trough all of the docs but I couldn't find out the most efficient way to send messages without polling all time.
Should I use code like
or is there a way to start the bot at the beginning and just stop polling updates? Or can I simply send messages without starting?
Thanks in advance