12.7.11 fix createBank
This commit is contained in:
2 files changed
+8
-5
No files matched your search
+1
-1
@@ -2,7 +2,7 @@ require('dotenv').config();
|
||||
|
||||
module.exports = {
|
||||
Dev: "PROD.",
|
||||
Version: "12.7.10",
|
||||
Version: "12.7.11",
|
||||
Admins: ["362791661274660874", "329371697570381824"], // Admins of the bot
|
||||
DefaultPrefix: "?",
|
||||
ServerID: "955668596745461830",
|
||||
|
||||
+7
-4
@@ -8,14 +8,17 @@ let bankSchema = mongoose.Schema({
|
||||
});
|
||||
|
||||
bankSchema.methods.createBank = function (userID, guildID, startingBalance) {
|
||||
this.banking.userID = userID;
|
||||
const newGuild = {
|
||||
this.banking = {
|
||||
userID: userID,
|
||||
guilds: {
|
||||
[`${guildID}`]: {
|
||||
account: {
|
||||
balance: startingBalance,
|
||||
cash: 0.00,
|
||||
}
|
||||
};
|
||||
this.banking.guilds[guildID] = newGuild
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user