GuildDeleteEvent called at bot start

When I start the bot, the GuildDeleteEvent is always called for the same guilds. The bot is also no longer on these servers. But this happens every time I start the bot. Could it be that the guilds are still somehow wrong in the cache or something?
2 Replies
d.js toolkit
d.js toolkit3d ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - 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
BastiGameツ
BastiGameツOP3d ago
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. 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? Okay, if this happens, I'll still get false from guild.available, right? Okay, thanks for the help

Did you find this page helpful?