When using findOneAndUpdate how can I add one to a value? In this case, I want to add 1 to the commandsUsed Object. Example Below:
await mongo().then(async (mongoose) => {
try {
await userSchema.findOneAndUpdate({
_id: author.id,
}, {
_id: author.id,
commandsUsed: //I want to add 1 to this Object
}, {
upsert: true,
})