bot.on("text", (ctx) => {....code}) #1865
Closed
ziyodbek0300
started this conversation in
General
Replies: 1 comment
-
We've found the tricky point of this problem. We were using nodemon package for watching code changes and also we were writing to json file for keeping data. When code writes the data to the json file, nodemon watches it and restart the project. As a result data was writed several times. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
bot.on("text", (ctx) => {....code}) I have written like this.
my code is running several times. I am writing data and data is recorded two, three times to db. How can I handle and insert data to db only one time.
Beta Was this translation helpful? Give feedback.
All reactions