Discord Bot won't start

Just up until now my bot was working fine, but it suddenly stopped to start (everything loads up as it should, but the ready event is never called) and I don’t really know what to do now…
Yes, I do login the bot with the correct token, I just checked. And no, when I do the “Discord Ban mega-thread the second! (Discord bot / Something took too long to do)” I see no HTTP 429

Edit: It works again. I changed nothing what so ever, I didn’t touch the code.

can i see your code? @rphii

Sure, via github? I know that it is possible, I just have to figure out how (I’ve never worked with it)

Can you share any errors in the logs?

okay


but are there any errors? @rphii

I see no errors in my log

everything loads up as it should

What do you expect and what is happening?

Have you tried locally?

check what i sent you @rphii

I expect to see that in my console I see something like “ready” and in discord that the bot is “playing” and online
bot.once(‘ready’, async () => {
console.log(${bot.user.username} is online);
bot.user.setActivity(${config.prefix}h, {type: “PLAYING”});
})

How do I try locally? If you mean not running it on a server, then I’m already doing that, because my PC is my host x)

Are you hosting this on your PC?

I don’t see anything wrong with that code…

1 Like

Yes I do, and just as I said: It JUST worked (well… now like an hour ago but still)

i think your using an old verison on discord.js

I personally use this to set activity:

client.on("message", (message) => {
  client.user.setActivity(`Use --help. I am in ${client.guilds.cache.size} servers!`,{
                          type: "PLAYING",
                          url: "https://riverside.rocks"
  })

This updates the online status everytime a message is sent.

Shouldn’t it be bot.on instead of bot.once? :thinking:

2 Likes

That would probably be it.

1 Like