#GuildDeleteEvent called at bot start
11 messages · Page 1 of 1 (latest)
- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - Not a discord.js issue? Check out #1081585952654360687.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
✅Marked as resolved by OP
Sounds like that guild might be quarantined and your bot actually is still in that guild but the guild is acting as if it didn’t exist anymore because of quarantine
But when I request the API directly, I get an “Unknown Guild” back. It's just strange that it's always for the same few guilds. And it's been like this for more than a week.
So should I return directly if (!guild.available) in the GuildDeleteEvent above? Or can this break something? Because it is important that we do not save any data from guilds that we are not on.
Yes. Unavailable guilds are not the same as guilds your bot actually left
Does that mean I can include if (!guild.available) in the GuildDeleteEvent without any problems?
But does that really make sense, since it happens every time the bot restarts for the same guilds, and it's happened over 10 times now. It can't be that the guilds are unavailable for so long, can it?
👆 there are more forms of unavailable than just server outage
Okay, if this happens, I'll still get false from guild.available, right?
Yes (it should, but you could just… check)