From e362a8a34d07e900d86dd87601c8626222704a37 Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Wed, 12 Oct 2022 17:48:14 -0700 Subject: [PATCH] 12.7.10 fix incorrect mongodb update query --- commands/settings.js | 4 ++-- config/config.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/settings.js b/commands/settings.js index 23b6866..2ea0a7d 100644 --- a/commands/settings.js +++ b/commands/settings.js @@ -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}`) diff --git a/config/config.js b/config/config.js index 350c314..89dd382 100644 --- a/config/config.js +++ b/config/config.js @@ -2,7 +2,7 @@ require('dotenv').config(); module.exports = { Dev: "PROD.", - Version: "12.7.9", + Version: "12.7.10", Admins: ["362791661274660874", "329371697570381824"], // Admins of the bot DefaultPrefix: "?", ServerID: "955668596745461830",