I have a public discord.js bot with MongoDB / Mongoose implemented.
So I've got a lot of events such as guildMemberAdd, guildBanAdd, etc. and my bot's a public server bot.
Now, if I wanted an ON / OFF thing for such events (since not everyone needs to primarily use my guildMemberAdd event for something like welcoming someone) how would I be able to do it?
I have one solution in mind, which is include every single event that my bot has inside a guildConfig model for MongoDB, and have a boolean to indicate ON / OFF. Then include a return statement that stops the event if the event is turned OFF (false in MongoDB).
Any other solution?