ID addr/fix incorrect var names
This commit is contained in:
7 files changed
+90
-87
No files matched your search
+6
-6
@@ -108,8 +108,8 @@ module.exports = {
|
||||
|
||||
} else banking = banking.banking;
|
||||
|
||||
if (!client.exists(banking.guilds[guildDB.serverID])) {
|
||||
const success = addBank(banking.guilds, guildDB.serverID, targetUserID, client, guildDB.startingBalance);
|
||||
if (!client.exists(banking.guilds[GuildDB.serverID])) {
|
||||
const success = addBank(banking.guilds, GuildDB.serverID, targetUserID, client, GuildDB.startingBalance);
|
||||
if (!success) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
@@ -123,9 +123,9 @@ module.exports = {
|
||||
if (args[0].name == "add") {
|
||||
// add money to user
|
||||
|
||||
let newBalance = banking.guilds[guildDB.serverID].account.balance + args[0].options[1].value;
|
||||
let newBalance = banking.guilds[GuildDB.serverID].account.balance + args[0].options[1].value;
|
||||
|
||||
client.dbo.collection("banks").updateOne({"account.userID":targetUserID},{$set:{[`banking.guilds.${guildDB.serverID}.account.balance`]:newBalance}}, function(err, res) {
|
||||
client.dbo.collection("banks").updateOne({"account.userID":targetUserID},{$set:{[`banking.guilds.${GuildDB.serverID}.account.balance`]:newBalance}}, function(err, res) {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
@@ -145,9 +145,9 @@ module.exports = {
|
||||
} else if (args[0].name == "remove") {
|
||||
// remove money from user
|
||||
|
||||
let newBalance = banking.guilds[guildDB.serverID].account.balance - args[0].options[1].value;
|
||||
let newBalance = banking.guilds[GuildDB.serverID].account.balance - args[0].options[1].value;
|
||||
|
||||
client.dbo.collection("banks").updateOne({"account.userID":targetUserID},{$set:{[`banking.guilds.${guildDB.serverID}.account.balance`]:newBalance}}, function(err, res) {
|
||||
client.dbo.collection("banks").updateOne({"account.userID":targetUserID},{$set:{[`banking.guilds.${GuildDB.serverID}.account.balance`]:newBalance}}, function(err, res) {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
|
||||
Reference in new issue
Block a user