12.7.11 fix createBank

This commit is contained in:
SowinskiBraeden committed 2022-10-12 19:21:20 -07:00
1 parent e362a8a34d
commit 5891df846c
2 files changed
+11 -8

No files matched your search

+10 -7
View File
@@ -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
}
};
/*