12.7.11 fix createBank
This commit is contained in:
2 files changed
+11
-8
No files matched your search
+10
-7
@@ -8,14 +8,17 @@ let bankSchema = mongoose.Schema({
|
||||
});
|
||||
|
||||
bankSchema.methods.createBank = function (userID, guildID, startingBalance) {
|
||||
this.banking.userID = userID;
|
||||
const newGuild = {
|
||||
account: {
|
||||
balance: startingBalance,
|
||||
cash: 0.00,
|
||||
this.banking = {
|
||||
userID: userID,
|
||||
guilds: {
|
||||
[`${guildID}`]: {
|
||||
account: {
|
||||
balance: startingBalance,
|
||||
cash: 0.00,
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
this.banking.guilds[guildID] = newGuild
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user