Discord Bot doesnt start

Hello, I just uploaded my Discord Bot Files via GitHub to Glitch

But if I wanted to start it just installs all packages but doesn´t start

Could somebody help me please? The link to my project is https://glitch.com/edit/#!/chemical-coreopsis

Professor Varox

In your settings.json file, you specify "process.env.TOKEN" as where to look for your bot token. However, since you passed a string, DBM will try to login with the token process.env.TOKEN. Since the way DBM works, you will need to replace process.env.TOKEN with your bot token, you can’t store it in the .env file as JSON files can’t reference JS stuff.

I´ve done it but there´s the issue again. Every package loads but then it stops and my bot is still offline

Could you send your bot’s console logs?

I hope this could help you

If you run refresh in the console then look at your project logs is the bot online?

This is the log after I typed refresh in the console

1 Like

Your bot appears to have started fine as when I visit your project name .glitch.me it say’s your bot is online.

It says that UptimeRobot kepps it online, but it didn´t go online. The bot is still offline

Freshping is way better than UptimeRobot, and it can ping every minute. My bot stays online 24/7.

@Doggo I can try Freshping later but at first my Discord bot should start

It could be your bot has an error and that’s what’s preventing it from starting up. Otherwise, it might be an issue with Glitch.

@Doggo the Bot starts on my PC without issues

Same problem here, it seems to be online (shows on discord) but if i console.log direct under the message event it doesn’t log anything at all (when i send a message)


(node:2948) UnhandledPromiseRejectionWarning: Error: Something took too long to do.
i’ll report in the mega-thread

1 Like

Discord might have banned your bot’s IP address.

@Doggo do you know how to find it out if Discord has banned the bots IP?

I know that my Bot is currently IP banned and I am waiting for the server to get its IP’s refreshed that my project is running on.

I get this Error message and stacktrace:

Error: Something took too long to do.
    at timeout.client.setTimeout (/rbd/pnpm-volume/5a9ad7cb-5007-49cb-ae10-a3b1e952540e/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/5a9ad7cb-5007-49cb-ae10-a3b1e952540e/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/Client.js:436:7)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)

If you are using Discord.js you can do:

discordClient.login(process.env.discordToken).then(() => {}).catch(err => console.error(err));

Of course process.env.discordToken is the discord bot token and err => console.error(err) in the catch function prints out the error message and the stack trace

I didn’t get this problem so I think my IP isn’t banned from Discord

seems like it. I am getting this exact error everytime Im banned from discord so your error might be somewhere else