async run(client, message, args, profileData) {
try {
await profileModel.findOneAndUpdate(
{
userID: message.author.id,
},
{
$inc: {
rank: args[0],
},
}
)
} catch (err) {
console.log(err);
};
}
Got this code, getting an error that it cant increment with non-number argument. my schema is a string:
rank: { type: String, default: “ManaPlayer” },