GuildJoinEvent
I have my bot creating some database schemes when the bot is added to a server and then when it leaves, it will all delete, if the bot is offline when the bot leaves or joins a server, how could I ensure that the guild still gets the schemes and still deletes?
7 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.how would I do that
Check client.guilds.cache on ready
what does that do?
It’s a Collection of Guilds the bot is in
Ok and check if they have data or not?
how would i use it tho with my question
No code provided, hard to know.
Also how you will manage things regards to your data, is most likely not related to DiscordJS anyways.
- But as Kinect says, check the guilds on the ready event and do
x
or y
if guild is found or not found in relation to your database data.
#useful-servers