Closed RasmonT closed 1 year ago
const bot = new TelegramBot(token, {
polling: false,
});
function start() {
void bot.startPolling();
console.log('Bot started');
}
start();
Thanks :-)
By the way I found another solution and this works also fine for me.
bot.getMe().then((me) => {
console.log(`Bot started as @${me.username}`);
}).catch((error) => {
console.error(error);
});
Hello guys,
I try to understand how to trigger action on the bot starts, I didn't see anything for this even in the documentation. How can I trigger let's say console.log once bot is online?
I was looking for something like this, but I don't know how to do it in this Library. Any ideas?