mullwar / telebot

The easy way to write Telegram bots in Node.js
https://www.npmjs.com/package/telebot
MIT License
1.48k stars 270 forks source link

Listening ONCE to an event #162

Open SAMERkab opened 5 years ago

SAMERkab commented 5 years ago

Is there something like a once method like the one implemented by the node.js EventEmitter class?

bot.once("text", (msg) => {
  ...
});
kdev commented 4 years ago

You can try that by implemeting that in your code. Just use the example you send and see if the bot reacts to a second message