Closed kshontop closed 1 year ago
Hi, I have the same problem. Any solution?
Salut, j'ai le même problème. Toute solution?
I haven't found the solution yet
Salut, j'ai le même problème. Toute solution?
I haven't found the solution yet
I found the solution a few moments ago.
The problem is caused because .on works as declaration, so if you repeat it, it will be declared multiple times.
In your example, you are declaring .on inside .sendMessage, so it will be declared all times that .sendMessage is executed.
You have to be sure that .on is declared once.
Add me on Discord please Accesed#1111
Salut, j'ai le même problème. Toute solution ?
je n'ai pas encore trouvé la solution
J'ai trouvé la solution il y a quelques instants.
Le problème est dû au fait que .on fonctionne comme une déclaration, donc si vous le répétez, il sera déclaré plusieurs fois.
Dans votre exemple, vous déclarez .on dans .sendMessage, il sera donc déclaré à chaque fois que .sendMessage sera exécuté.
Vous devez être sûr que .on est déclaré une fois.
please add me
@ChezVolt you test to use "bot.once('... " is similar to bot.on, but is only call one time and the event removed
mais
Thanks for the answer do you have discord to talk about it in more detail?
I am developing a Telegram bot that uses the Coinbase API to allow users to make cryptocurrency payments. Everything is working fine until I encountered a problem with the charge creation loop. After creating a charge and pressing the back button to return to the main menu, if I decide to create a new charge, the bot gets stuck in a strange loop and essentially sends the message once again every time I input something. It's like the code never breaks the switch and always waits for input. I am using Node.js with the node-telegram-bot-api library to create the Telegram bot. If anyone has an idea of what's going wrong, I would be happy to hear it. Thanks in advance!