13.1.2 debug bank related commands
This commit is contained in:
7 files changed
+16
-20
No files matched your search
+2
-2
@@ -94,7 +94,7 @@ module.exports = {
|
||||
|
||||
// Register inventory for user
|
||||
let newBank = new Bank();
|
||||
newBank.createBank(targetUserID, GuildDB.serverID, GuildDB.startingBalance);
|
||||
newBank.createBank(targetUserID, GuildDB.serverID, GuildDB.startingBalance, 0);
|
||||
newBank.save().catch(err => {
|
||||
if (err) return client.sendInternalError(interaction, err);
|
||||
});
|
||||
@@ -106,7 +106,7 @@ module.exports = {
|
||||
if (!success) return client.sendInternalError(interaction, 'Failed to add bank');
|
||||
}
|
||||
|
||||
const newBalance = args[0].name == 'add'
|
||||
let newBalance = args[0].name == 'add'
|
||||
? banking.guilds[GuildDB.serverID].account.balance + args[0].options[1].value
|
||||
: banking.guilds[GuildDB.serverID].account.balance - args[0].options[1].value;
|
||||
|
||||
|
||||
Reference in new issue
Block a user