Please describe the problem you are having in as much detail as possible:
When I try to log my bot in, I get this:
There are 1 unavailable guilds. Waiting for their GUILD_CREATE packets
Consequently, the bot's "ready" event is not called and it just disconnects after a few seconds.
Include a reproducible code sample here, if possible:
const botSettings = require("./bot_settings.json");
const Discord = require("discord.js");
const client = new Discord.Client();
// Set the prefix
let prefix = "!";
client.on("message", (message) => {
console.log("a message was sent")
});
client.on("ready", async () => {
console.log(`${client.user.username} is ready!`)
})
client.on("debug", async (err) => {
console.log(err)
})
client.login(botSettings.token).then((tok) => {
console.log('Bot logged in successfully!')
}, err => {
console.log(`The bot failed to login due to an error! The error follows:\n\n${err}\n\n`)
client.destroy()
})
Further details:
Please try updating your discord.js version
npm update discordjs/discord.js
This should have been fixed by #3393 which was just merged 20 Minutes ago.
This seems to have helped for me.
Yep, it has helped me, as well. I reinstalled Discord.js entirely.
@CryptAlchemy So if it helped you why dont you close the Issue?
Or am I understanding something wrong?
Most helpful comment
This seems to have helped for me.