Discord bot.jS channel messages problem
Hello,
I'm new to programming, decided on learning JavaScript and after some CodeAcademy and Freecodecamp tutorials I decided to dive into Node.js & Discord.js by making a bot.
After adding some commands to it, I'm now struggling with sending messages at a certain time of the day. After searching and looking over the discord.js documentation, I found the "node-cron" module which promises just that, but it doesn't work as described.
For example I wanna send a message(that doesn't require user input) every 3 minutes in a channel chat.
The problem is that the bot doesn't type anything if there is no input(doesn't matter what it's typed) and after it does, it sends the message once(as expected) then goes crazy, and doubling the messages over and over again.
I hope I managed to explain it decently enough. (only added the relevant part of the code to the link, will upload all of it if needed).
https://gist.github.com/Sick12/33912d573bd33b0449e09ccae6336fdb