12.7.10 fix incorrect mongodb update query

This commit is contained in:
SowinskiBraeden committed 2022-10-12 17:48:14 -07:00
1 parent 7ddc95d1ea
commit e362a8a34d
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -589,7 +589,7 @@ module.exports = {
}
} else if (args[0].name == 'starting_balance') {
client.dbo.collection("guilds").updateOne({"server.serverID": GuildDB.serverID}, {"server.startingBalance":args[0].options[0].value}, function(err, res) {
client.dbo.collection("guilds").updateOne({"server.serverID": GuildDB.serverID}, {$set: {"server.startingBalance":args[0].options[0].value}}, function(err, res) {
if (err) return client.sendInternalError(err);
});
@@ -634,7 +634,7 @@ module.exports = {
if (err) return client.sendInternalError(err);
});
}
const perform = searchIndex = -1 ? 'set' : 'updated';
let perform = searchIndex = -1 ? 'set' : 'updated';
const successEmbed = new EmbedBuilder()
.setDescription(`Successfully ${perform} <@&${roleId}>'s income to $${args[0].options[0].options[1].value}`)