#MySQL Issue
1 messages · Page 1 of 1 (latest)
first time the bot joins a server is the correct way to do it
Especially if you have a public growing bot
Alright, What about the bot being offline or crashing and not counting the join? (Of course this wouldnt happen often, as it is public but its good to keep in mind)
you might need to use some of the other ways if your bot is already in a few servers
^ if i was ignoring what i just said, id use guild.join right
wym?
yeah you wont get join events if your bot is offline when someone adds it.
So what would i use instead of join event?
you can check that all the bot guild ids are in the db, on ready. along with the on guild join listener
And, if a guild ID is not in the DB, i insert it?
I get everything up to on ready, what do i do with guild join listener?
yep
what if your bot joins a server when it is online. you dont want to wait till a restart for it to get added
Oh yeah that's true, so I'd also just do this on the event
you dont need to check if its already in the db
Just insert it
Although you might want to listen for on guild remove too
But thats upto you
if you dont listen for guild remove, you need to check
isnt check and listen same thing
by listen i meant listening for the on_guild_remove events
👀
Ah alr, yeah