How to stop the function of the telegram bot?

0 like 0 dislike
42 views 0 2
There is a function

bot.on('text', (ctx) => { console.log(ctx.message.text) })


How to stop her execution so that she stopped listening to user input
asked by | 42 views

2 Answers

0 like 0 dislike
0
Apparently bot.off('text').\\
In General, it is necessary to specify a framework that you yuzaete for development.
answered by
0 like 0 dislike
0
You handler. There are 2 parts - sending events and processing events.

If you want to disable processing then simply remove this block of code and restart the bot (or if he does nothing else then all prerate process)

If you want to get traffic then get the address of your bot where it was configured
answered by

Related questions

0 like 0 dislike
7 answers
0 like 0 dislike
2 answers
0 like 0 dislike
3 answers
24,551 questions
45,978 answers
0 comments
524 users