Bot responds multiple times

I don’t know how “boosting” works but it might run 2 times the app ? One not boosted and one boosted but both are updated ? My theory might be farfetched tho.

not sure, ive just noticed that it’s often started to have multiple nodes/instances & doing commands twice since i updated to the paid plan. :frowning: thanks for trying to help, i’ll send an invite when glitch is loading my code at all. i can load one bot, but not the other

After thinking a bit further about it, I think it might be directly a Glitch issue, please send an email there : support@glitch.com

ah, ok. i can do that. thanks!

sorry OP for bombarding your thread, i just came to say i had the same problem & didn’t realize people would respond when this had no replies lol!

Maybe Glitch is having a outage now.

I will ask the OP that, did you try refreshing your bot’s token, and can you answer it there? Or maybe you are running the same code in your local computer or created a other project and forgot to delete it maybe? Or can you check that isn’t code is having a issue? (like sending the message twice)

I’m going to try resetting the bot’s token. The code isn’t running on a local PC, nor is it on another project. The code was working fine, and then just started duplicating without a code change, which is why it’s weird. Once I reset the token, I’ll report back to see if it did anything.

@maeglutz - no worries about the bombarding, if it leads to a solution the thread did its job!

Regenerated my bot token and updated the program with it, now the bot won’t initialize it seems.

Can you share the logs?

mine also started to duplicate without a code change as well. is your error “UnhandledPromiseRejectionWarning: Error: Incorrect login details were provided.” by chance?

This error is occurred because you entered the wrong bot token.

This is the error that my log showed eventually:

(node:1045) UnhandledPromiseRejectionWarning: Error: Something took too long to do. at timeout.client.setTimeout (/rbd/pnpm-volume/04d3cbf8-1c8f-4c8c-8244-9d3c344f7eb6/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/ClientManager.js:40:57) at Timeout.setTimeout [as _onTimeout] (/rbd/pnpm-volume/04d3cbf8-1c8f-4c8c-8244-9d3c344f7eb6/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/Client.js:436:7) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10) (node:1045) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 9) (node:1045) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Your project was IP banned.
Post your project name on the Discord Ban Mega Thread.

1 Like

Posted there, thanks!

There about my post i mentioned the 429 (Too Many Requests) issue.

I’m experiencing the same issue on my boosted app Slack (not discord) bot.
It seems like an older version of my code is also still running while the updated version is running resulting in incoming chat-messages triggering both the old & new version of their respective messagehandlers, resulting in the bot responding twice.

Okay, so right Glitch is under unplanned maintince. So, this is expected to happen. If you get a 429 from discord, go post on the megathread. (I will post it for you if you need to.) Making a new project will most likely ban that IP too. If you need other assistance me and other members can help you.

Yeah, I tried the remixing solution and now it’s not recognizing the express module, which I suppose means just a sit and wait time. :slight_smile:

No, Its something that’s been happening ALOT it has not been blocked at all most of the times this will fix it killall -u app
hope it helps

1 Like

I don’t know if this is still needed but a possible issue is that your bot is running the main script, and then also running separate versions from the debugger. If you run your code in a debugger it actually runs it on a new thread, so if you don’t cancel (ctrl+c in the terminal) those debugger versions they will also run along with the main one, creating two or three versions of the bot all active at the same time.
Found this out the hard way