I have a question regarding mongoose and findOneAndUpdate in it. If I execute this function and a certain value is already in the database, can I somehow block it from changing to another?
await guildSchema.findOneAndUpdate({
guildID: message.guild.id,
},
{
message: `test`,
},
{
upsert: true,
});