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

+1 -1
View File
@@ -2,7 +2,7 @@ require('dotenv').config();
module.exports = { module.exports = {
Dev: "PROD.", Dev: "PROD.",
Version: "12.7.10", Version: "12.7.11",
Admins: ["362791661274660874", "329371697570381824"], // Admins of the bot Admins: ["362791661274660874", "329371697570381824"], // Admins of the bot
DefaultPrefix: "?", DefaultPrefix: "?",
ServerID: "955668596745461830", ServerID: "955668596745461830",
+10 -7
View File
@@ -8,14 +8,17 @@ let bankSchema = mongoose.Schema({
}); });
bankSchema.methods.createBank = function (userID, guildID, startingBalance) { bankSchema.methods.createBank = function (userID, guildID, startingBalance) {
this.banking.userID = userID; this.banking = {
const newGuild = { userID: userID,
account: { guilds: {
balance: startingBalance, [`${guildID}`]: {
cash: 0.00, account: {
balance: startingBalance,
cash: 0.00,
}
}
} }
}; }
this.banking.guilds[guildID] = newGuild
}; };
/* /*