13.2.6 minor bug fix
This commit is contained in:
3 files changed
+4
-4
No files matched your search
+1
-1
@@ -860,7 +860,7 @@ module.exports = {
|
||||
|
||||
return interaction.send({ embeds: [successEmbed] });
|
||||
|
||||
} else if (arg[0].name == 'work_limiter') {
|
||||
} else if (args[0].name == 'work_limiter') {
|
||||
client.dbo.collection("guilds").updateOne({"server.serverID":GuildDB.serverID}, {$set: {"server.workLimiter": args[0].options[0].value}}, function(err, res) {
|
||||
if (err) return client.sendInternalError(interaction, err);
|
||||
});
|
||||
|
||||
+2
-2
@@ -57,7 +57,7 @@ module.exports = {
|
||||
return interaction.send({ embeds: [embed] });
|
||||
}
|
||||
|
||||
const targetUserID = args[0].options[0].value.replace('<@!', '').replace('>', '');
|
||||
const targetUserID = args[0].value.replace('<@!', '').replace('>', '');
|
||||
let banking = await client.dbo.collection("banks").findOne({"banking.userID": targetUserID}).then(banking => banking);
|
||||
|
||||
if (!banking) {
|
||||
@@ -87,7 +87,7 @@ module.exports = {
|
||||
if (!success) return client.sendInternalError(interaction, 'Failed to add bank');
|
||||
}
|
||||
|
||||
const newTargetBalance = banking.guilds[GuildDB.serverID].account.balance - args[0].options[1].value;
|
||||
const newTargetBalance = banking.guilds[GuildDB.serverID].account.balance - args[1].value;
|
||||
|
||||
client.dbo.collection("banks").updateOne({"banking.userID":targetUserID},{$set:{[`banking.guilds.${GuildDB.serverID}.account.balance`]:newTargetBalance}}, function(err, res) {
|
||||
if (err) return client.sendInternalError(interaction, err);
|
||||
|
||||
Reference in new issue
Block a user