Closed NotSoMik closed 1 year ago
when setting your settings (strings or boolean) with your get
and set
functions simply use MongoDB to set and retrieve the data:
const get = async(discordClient, guild) => {
const get_setting = await settings.findOne({_id: guild.id})
return get_setting
}
const set = async(discordClient, guild, value) => {
await settings.findOneAndUpdate({
_id: guild.id
},{
_id: guild.id,
toggle: value,
},{
upsert: true
})
}
(these are basic examples do not just copy this code, you will get errors)
Yo, can you please tell us how to use databases in your package such as mongodb enmap, would be very nice