-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdb.js
38 lines (35 loc) · 1.03 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
// db.js
const Enmap = require("enmap");
/**
* Streamer data structure:
* {
* id: String, // A unique identifier for the streamer
* name: String, // The streamer's name
* platform: String, // The platform the streamer is on (e.g., Twitch, YouTube)
* channelID: String, // The Discord channel ID where alerts should be sent
* platformUserID: String, // The streamer's user ID on the platform (if applicable)
* liveStatus: [
* {
* isLive: Boolean, // Whether the streamer is currently live
* timestamp: Date, // The timestamp of this status
* viewers: Number, // Current number of viewers, if known
* }
* ],
* lastLiveAt: Date, // The last time the streamer was detected as live
* error: String, // Error message if the last status check failed
* }
*/
/**
* @type {import("enmap").Enmap}
* Custom settings for each guild.
*/
const guildSettings = new Enmap({
name: "guildSettings",
autoEnsure: {
streamers: [],
},
ensureProps: true,
});
module.exports = {
guildSettings,
};