-
Notifications
You must be signed in to change notification settings - Fork 0
/
db.js
86 lines (80 loc) · 1.95 KB
/
db.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// db.js
const Enmap = require("enmap");
/**
* @type {import("enmap").default}
* Custom settings for each guild.
* Includes settings like custom prefix, logs channel, etc.
*/
const guildSettings = new Enmap({
name: "guildSettings",
autoEnsure: {
logsChannel: null,
adminChannel: null,
modRoles: [],
economyEnabled: true,
},
ensureProps: true,
});
/**
* @type {import("enmap").default}
* Data related to the economy system in each guild.
* Includes user balances, total economy size, etc.
*/
const economyData = new Enmap({
name: "economyData",
autoEnsure: {
totalEconomySize: 0,
userBalances: {}, // { userId: { balance, lastDaily, lastWeekly, lastWork, transactions: [] etc. } }
topEarners: [],
currencySymbol: "💰",
currencyName: "Coins",
dailyAmount: 10,
weeklyAmount: 100,
workMin: 10,
workMax: 50,
},
ensureProps: true,
});
/**
* @type {import("enmap").default}
* User-specific inventory data.
* Includes items owned, quantity, etc.
*/
const userInventory = new Enmap({
name: "userInventory",
autoEnsure: {
items: {}, // { itemId: { quantity, equipped } }
},
ensureProps: true,
});
/**
* @type {import("enmap").default}
* Items that can be bought in each guild's economy system.
* Includes item price, description, role assinged on buy etc.
*/
const shopItems = new Enmap({
name: "shopItems",
autoEnsure: {
items: {}, // { itemId: { name, price, description, role } }
},
ensureProps: true,
});
/**
* @type {import("enmap").default}
* Streamers that are tracked in each guild.
* Includes the streamer's name, platform, and the channel to send notifications to.
*/
const streamerData = new Enmap({
name: "streamerData",
autoEnsure: {
streamers: [], // Array of objects { name: 'streamerName', platform: 'Twitch', channel: 'channelId' }
},
ensureProps: true,
});
module.exports = {
guildSettings,
economyData,
userInventory,
shopItems,
streamerData,
};