Discord bot is unable to login over glitch, however it works when run locally


#1

When running a discord bot and logging in via token it’ll work successfully if run locally. The issue is when I run the exact same project using glitch it gets stuck at client.login(token). It has run perfectly fine for the past couple months, and suddenly without changing anything this issue has arisen.

The error I get after it times out on glitch is:

(node:12404) UnhandledPromiseRejectionWarning: Error: Something took too long to do.

    at timeout.client.setTimeout (/rbd/pnpm-volume/f0656776-473c-46c8-ae14-dc0a8f191872/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/ClientManager.js:40:57)

    at Timeout.setTimeout [as _onTimeout] (/rbd/pnpm-volume/f0656776-473c-46c8-ae14-dc0a8f191872/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/Client.js:433:7)

    at ontimeout (timers.js:498:11)

    at tryOnTimeout (timers.js:323:5)

    at Timer.listOnTimeout (timers.js:290:5)

Project is nex-discord

Any help would be much appreciated!


#2

Can you try using a new token for the bot, also, I suggest keeping your token in ENV


#3

Hey thanks for the reply mate,

I actually regenerated a new token earlier which unfortunately didn’t work, and my token is always stored in .env


#4

I am going to assume, that there are some ip’s blacklisted, so you will have to wait for glitch to resolve that on there end, so in the mean time, I suggest using the bot locally until this is fixed!


#5

Ah true, hopefully we can get some confirmation from a staff member. Until then I guess I’ll just run it from the pi haha.

Thanks for the quick replies man!


#6

No Problem! Good luck with your developing! :slight_smile:


#7

Hey @SnowFlurries, welcome to the Glitch forum!

Your project was on a host that Discord had banned. I’ve moved it to a new host, so you might want to check again to see if it’s working better.


#8

Hey!

It seems to be working well again. Thanks for the help!