it’s been doing this since june 11th. i thought maybe it was me doing something wrong but now that i’ve come to the forums to see it’s happening often, i see that it’s not my bot.
the bot either turns itself off with “(node:20917) UnhandledPromiseRejectionWarning: Error: Incorrect login details were provided.” or sends messages/does commands two or three times in a row. every time i regen the token & paste back in, only for it to mess up within 24 hours. i haven’t changed any code in the bot for months but it somehow will mess itself up.
Because sometimes you are pasting the wrong token. Try re-reseting your bot’s token and paste it in the client.login line or here is the config.json is.
i’m not pasting the wrong token though, i’m regenning it & pasting it in the same spot every single time, for the bot to work for another day or so then suddenly double sending messages or getting that error code. if i’m pasting the wrong one, it wouldnt start to work again in the first place. i have 2 bots both run on glitch, ones used way less, but both will start double sending messages out of nowhere.
no, i’m not. both have different statuses on them, i would know if they both had the same token attached because they would both have the same playing/status on them…?
Because they have an error in common. I have two bots perfectly running (when they run [ref. to recent outages and ping ban]) and one of them is in development. If you need help, give a link to the code, it would be faster as the error can be in multiple places in the code (so you don’t have to copy/paste a bunch of files. Make sure your tokens are in the .env file if you invite someone to view your code.
they are two completely different bots, i would know if one started to act like the other…
this did start to happen once i boosted my bots & chose the “always on” option. i’m not sure if this has anything to do with it, but before when i used uptimerobot they would go down sometimes, but never error out or send double messages. just thought that was a weird coincidence.
i would have to double check that the tokens are in .env but i can’t open the code now anyways, i think glitch is struggling at the moment as well. i’ll double check & come back later.
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. 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
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!
mine also started to duplicate without a code change as well. is your error “UnhandledPromiseRejectionWarning: Error: Incorrect login details were provided.” by chance?
(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.
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.
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