forked from hmes98318/Music-Disc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
176 lines (151 loc) · 7.78 KB
/
Copy pathconfig.js
File metadata and controls
176 lines (151 loc) · 7.78 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
/**
* @type {import('./src/@types/index.js').Config} - Bot config
*/
const config = {
// Lavalink node list
nodeList: [
{
id: 'Node 1',
hostname: 'localhost',
port: 2333,
password: 'youshallnotpass'
}
],
spotify: {
clientId: '', // If you want to use Spotify to play songs, you need to set up Spotify credentials.
clientSecret: '' // https://developer.spotify.com/documentation/web-api
},
bot: {
textCommand : true, // Whether to enable text command
slashCommand : true, // Whether to enable slash command
// OAUTH2 mode requires setting 'admin', 'clientSecret' value
admin : [], // Admin users, It must be the user ID (string[])
/**
* DYNAMIC mode: The first user to execute a command becomes the DJ
* STATIC mode: The DJ is determined by the config file
*/
djMode : 'DYNAMIC', // DJ mode: 'STATIC' (config.js based) or 'DYNAMIC' (first user to execute command based)
dj : [], // DJ users, It must be the user ID (string[])
djRoleId : '', // DJ role ID, members with this role have DJ permissions (string)
djLeave: {
mode: 'PLAY', // 'PLAY' = next DJ on successful /play; 'COOLDOWN' = auto-assign after cooldown
cooldown: 5000, // Cooldown in ms, only used in COOLDOWN mode (default: 5000ms)
},
clientSecret : '',
name : 'Music Disc',
prefix : '+', // Text command prefix
status : 'online', // 'online' | 'idle' | 'dnd'
activity: {
type : 0, // https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
name : '+help | music',
// state : '',
// url : '', // The streaming type currently only supports Twitch and YouTube. Only https://twitch.tv/ and https://youtube.com/ urls will work.
},
embedsColors: {
message : '#FFFFFF', // Message embed color
success : '#FFFFFF', // Success embed color
error : '#FF0000', // Error embed color
warning : '#FFFF00', // Warning embed color
},
volume: {
default : 50,
max : 100,
},
// Auto leave channel settings
autoLeave: {
enabled : true,
cooldown : 5000, // ms
},
// Show voice channel updates
displayVoiceState : true,
// Specify the text channel for receiving commands.
// If this value is set, text messages from other channels will not be processed.
specifyMessageChannel : '', // Text channel ID
// Specify the voice channel to join.
// If this value is set, other voice channels will not be joined.
specifyVoiceChannel : '', // Vioce channel ID
// After starting the Bot, it will automatically join the specified voice channel and wait.
// The specifyVoiceChannel value needs to be set, otherwise it will be invalid.
startupAutoJoin : false,
// Language settings
i18n: {
localePath : '../../locales',
defaultLocale : 'en-US'
},
// Max queued songs per user settings
maxQueuedSongs: {
enabled : true, // Enable/disable this feature
global : 100, // Global maximum queue size for the bot (absolute limit)
default : 5, // Default limit for users without special roles
djs : 10, // Limit for DJ role users
roles: { // Custom limits per role ID
// "123456789012345678": 10,
// "987654321098765432": 20,
}
},
// Fair queue rotation (round-robin)
fairQueue : false, // When enabled, rotates queue to play songs from different users in turn
// Voice channel status emojis (standard or custom Discord emojis)
// Set to [] to disable emoji. If multiple provided, a random one is picked each time.
// Custom emojis: use format '<:name:id>' or '<a:name:id>' for animated
voiceStatusEmojis : ['🎵'],
// Voice channel status idle text (shown when bot is in channel but nothing is playing)
// Set to '' to disable idle status. Supports standard or custom Discord emojis in the text.
// Example: '🎵 Use /play to jam!'
voiceStatusIdleText : '🎵 Use /play to jam!'
},
blacklist : [], // It must be the user ID (string[])
// Web dashboard settings
webDashboard: {
enabled : true,
port : 33333,
loginType : 'USER', // 'USER' | 'OAUTH2'
// USER mode settings
user: {
username : 'admin',
password : 'password',
},
// OAUTH2 mode settings
oauth2: {
link : '',
redirectUri : 'http://localhost:33333/login',
},
// SessionManager config
sessionManager: {
validTime : 10 * 60 * 1000, // Session validity time (ms) (default: 10 minutes)
cleanupInterval : 5 * 60 * 1000 // Timing cleaner time (ms) (default: 5 minutes)
},
// IPBlocker config
ipBlocker: {
retryLimit : 5, // Maximum number of retries (default: 5)
unlockTimeoutDuration : 5 * 60 * 1000, // Blocking time (ms) (default: 5 minutes)
cleanupInterval : 5 * 60 * 1000 // Timing cleaner time (ms) (default: 5 minutes)
}
},
// Local Lavalink node
localNode: {
enabled : false,
autoRestart : true,
// downloadLink : 'https://github.com/lavalink-devs/Lavalink/releases/download/4.1.1/Lavalink.jar'
},
// Command permission settings
command: {
disableCommand: [], // Disabled commands, all enabled by default
adminCommand: ['blacklist', 'language','server', 'status'], // Admin commands, only Admin role user can use
djCommand: ['dj', 'filter'], // DJ commands, only DJ role user can use
// Supported commands: 'skip', 'seek', 'pause'
// When a command name is listed here, only the requester of the currently playing song may use it.
// Admins can always bypass this restriction regardless.
requesterOnly: ['skip', 'seek', 'pause'],
// DJs (both role-based and dynamic) can bypass 'requesterOnly' for commands listed here.
// Only effective for commands that are also listed in requesterOnly.
// Supported commands: 'skip', 'seek', 'pause'
requesterDjBypass: ['skip', 'seek', 'pause']
},
// Queue persistence settings
queuePersistence: {
enabled : false, // Enable/disable persistent queue storage
path : './data/queue.db' // Path to SQLite database file
}
};
export { config };