MongoDB Discord.JS (Only saving to 1 profile)
It just adds to the xp to the same profile every time.
f1fty•23d ago
because of
findOne
u need userProfiles = await UserProfile.find({ guildId: message.guild.id })
than loop over every profile and update xp for each oneWelcome to the Sapphire Discord server! The next-gen object-oriented Discord.js bot framework can be found here.
2.2KMembers
View on DiscordWant results from more Discord servers?
More PostsCan't load subcommandHello, i'm trying to update to the latest djs and sapphire versions (from djs v13 and sapphire v3) amultiplie registered handlersHi, is it better to split for example the button interactions for different buttons to different filTypeScript CheckHey. The code works but I am curious if there is any way to do a better coding job like cleaniness eVariable parameter type based on the previous variableI want to add a 'parametric' `set` subcommand to one of my commands
For that command the values cancreate a command that has spaces as one argfor example, i would want a command with multiple spaces for each arg, such as `!command <argwithspaHelp fetching usersI didn't know if this was a sapphire or d.js issue but this line of code im using to fetch the users