-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdashboard.js
348 lines (338 loc) · 16.3 KB
/
dashboard.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
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
const SoftUI = require('dbd-soft-ui');
const db = require("quick.db")
const { Client, Collection, GatewayIntentBits, Partials } = require("discord.js");
const bitbot = new Client({intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildEmojisAndStickers, GatewayIntentBits.GuildIntegrations, GatewayIntentBits.GuildWebhooks, GatewayIntentBits.GuildInvites, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.GuildMessageTyping, GatewayIntentBits.DirectMessages, GatewayIntentBits.DirectMessageReactions, GatewayIntentBits.DirectMessageTyping, GatewayIntentBits.MessageContent], shards: "auto", partials: [Partials.Message, Partials.Channel, Partials.GuildMember, Partials.Reaction, Partials.GuildScheduledEvent, Partials.User, Partials.ThreadMember]});
const DBD = require("discord-dashboard");
const config = require("./configuration.js");
let token = config.token
let dbd_license = config.dbd_license
let client_id = config.client_id
let client_secret = config.client_secret
let redirect_uri = config.redirect_uri
let port = config.port
let domain = config.domain
let redirectUri = config.redirectUri
let owner = config.owner
/* --- DASHBOARD --- */
let langsSettings = {};
(async ()=>{
let DBD = require('discord-dashboard');
await DBD.useLicense(dbd_license);
DBD.Dashboard = DBD.UpdatedClass();
const Dashboard = new DBD.Dashboard({
port: port,
client: {
id: client_id,
secret: client_secret
},
redirectUri: `${domain}${redirectUri}`,
domain: domain,
ownerIDs: owner,
useThemeMaintenance: true,
useTheme404: true,
bot: bitbot,
theme: SoftUI({
customThemeOptions: {
index: async ({ req, res, config }) => {
const feeds = ["Current Users", "CPU", "System Platform", "Server Count"]
const cards = [
{
title: "CPU",
icon: "single-02",
getValue: "Guest",
progressBar: {
enabled: true,
getProgress: 50 // 0 - 100 (get a percentage of the progress)
}
}
// Include 3 more cards
]
const graph = {
values: [690, 524, 345, 645, 478, 592, 468, 783, 459, 230, 621, 345],
labels: ["1m", "2m", "3m", "4m", "5m", "6m", "7m", "8m", "9m", "10m"]
}
return {
feeds,
cards,
graph
}
},
},
websiteName: "Vexr Bot",
colorScheme: "Red",
supporteMail: "[email protected]",
icons: {
favicon: 'https://matrixbot.tech/assets/img/white.png',
noGuildIcon: "https://matrixbot.tech/assets/img/white.png",
sidebar: {
darkUrl: 'https://matrixbot.tech/assets/img/white.png',
lightUrl: 'https://matrixbot.tech/assets/img/white.png',
hideName: true,
borderRadius: false,
alignCenter: true
},
},
index: {
card: {
category: "Vex",
title: "DJS V14 - EVERYTHING YOU NEED",
description: "Made by Love by Vex[R]</i></b>",
image: "./img/white.png",
link: {
enabled: true,
url: "https://google.com"
}
},
graph: {
enabled: true,
lineGraph: true,
title: 'Memory Usage',
tag: 'Memory (MB)',
max: 100
},
},
sweetalert: {
errors: {},
success: {
login: "Successfully logged in.",
}
},
preloader: {
image: "/img/white.png",
spinner: false,
text: "Dashboard is loading",
},
admin: {
pterodactyl: {
enabled: false,
apiKey: "apiKey",
panelLink: "https://panel.website.com",
serverUUIDs: []
}
},
commands: [
{
category: "Info",
subTitle: "Information commands regarding the bot",
categoryId: "info", // No spaces or special characters
hideAlias: true, // Optional - Default: false - Hides the alias from all commands in the category
hideDescription: false, // Optional - Default: false - Hides the description from all commands in the category
hideSidebarItem: false, // Optional - Default: false - Hides the category from the sidebar
list: [
{
commandName: "ping",
commandUsage: "/ping",
commandDescription: "Returns the bot's latency!",
commandAlias: "None"
},
{
commandName: "help",
commandUsage: "/help",
commandDescription: "Shows all the bot available commands!",
commandAlias: "None"
},
{
commandName: "avatar",
commandUsage: "/avatar",
commandDescription: "Shows the user avatar!",
commandAlias: "None"
},
]
},
{
category: "Fun",
subTitle: "Fun commands regarding the bot",
categoryId: "fun", // No spaces or special characters
hideAlias: true, // Optional - Default: false - Hides the alias from all commands in the category
hideDescription: false, // Optional - Default: false - Hides the description from all commands in the category
hideSidebarItem: false, // Optional - Default: false - Hides the category from the sidebar
list: [
{
commandName: "blue",
commandUsage: "/blue",
commandDescription: "Returns the blue filtered avatar!",
commandAlias: "None"
},
{
commandName: "blurple",
commandUsage: "/blurple",
commandDescription: "Blurple command on avatar!",
commandAlias: "None"
},
{
commandName: "cat",
commandUsage: "/cat",
commandDescription: "Cat filtered avatar!",
commandAlias: "None"
},
{
commandName: "comrade",
commandUsage: "/comrade",
commandDescription: "Shows the comrade based avatar!",
commandAlias: "None"
},
{
commandName: "fake-tweet",
commandUsage: "/fake-tweet",
commandDescription: "Shows the fake tweet , tweeted by user!",
commandAlias: "None"
},
{
commandName: "hyperlink",
commandUsage: "/hyperlink",
commandDescription: "Converts the hyperlink into string!",
commandAlias: "None"
},
{
commandName: "triggered",
commandUsage: "/triggered",
commandDescription: "Triggered based avatar!",
commandAlias: "None"
}
]
},
{
category: "Music",
subTitle: "Music commands regarding the bot",
categoryId: "music", // No spaces or special characters
hideAlias: true, // Optional - Default: false - Hides the alias from all commands in the category
hideDescription: false, // Optional - Default: false - Hides the description from all commands in the category
hideSidebarItem: false, // Optional - Default: false - Hides the category from the sidebar
list: [
{
commandName: "autoplay",
commandUsage: ",autoplay",
commandDescription: "Autoplays the music after the queue ends!",
commandAlias: "None"
},
{
commandName: "filters",
commandUsage: ",filters",
commandDescription: "Applies the variety of filters to make music exciting!",
commandAlias: "None"
},
{
commandName: "forward",
commandUsage: ",forward",
commandDescription: "Forwards the music!",
commandAlias: "None"
},
{
commandName: "join",
commandUsage: ",join",
commandDescription: "Joins the channel where you're in!",
commandAlias: "None"
},
{
commandName: "leave",
commandUsage: ",leave",
commandDescription: "Leaves the channel",
commandAlias: "None"
},
{
commandName: "nowplaying",
commandUsage: ",nowplaying",
commandDescription: "Shows the current playing song!",
commandAlias: "None"
},
{
commandName: "pause",
commandUsage: ",pause",
commandDescription: "Pauses the music!",
commandAlias: "None"
},
{
commandName: "play",
commandUsage: ",play",
commandDescription: "Plays the music!",
commandAlias: "None"
},
{
commandName: "playskip",
commandUsage: ",playskip",
commandDescription: "Skips to the next one!",
commandAlias: "None"
},
{
commandName: "playtop",
commandUsage: ",playtop",
commandDescription: "Plays the top music of the queue!",
commandAlias: "None"
},
{
commandName: "previous",
commandUsage: ",previous",
commandDescription: "Plays the previous song!",
commandAlias: "None"
},
{
commandName: "queue",
commandUsage: ",queue",
commandDescription: "Shows the queue of the server!",
commandAlias: "None"
},
{
commandName: "repeat",
commandUsage: ",repeat [song,queue]",
commandDescription: "Repeats the music!",
commandAlias: "None"
},
{
commandName: "resume",
commandUsage: ",resume",
commandDescription: "Resumes the music of the queue!",
commandAlias: "None"
},
{
commandName: "rewind",
commandUsage: ",rewind [time]",
commandDescription: "Rewinds the music according the time you entered!",
commandAlias: "None"
},
{
commandName: "seek",
commandUsage: ",seek [time]",
commandDescription: "Seeks the music according the time you entered!",
commandAlias: "None"
},
{
commandName: "shuffle",
commandUsage: ",shuffle",
commandDescription: "Shuffles the music in the queue!",
commandAlias: "None"
},
{
commandName: "skip",
commandUsage: ",skip",
commandDescription: "Skips the music!",
commandAlias: "None"
},
{
commandName: "skipto",
commandUsage: ",skipto [song number]",
commandDescription: "Skips to the particular song number you want!",
commandAlias: "None"
},
{
commandName: "stop",
commandUsage: ",stop",
commandDescription: "Stops the music in the server!",
commandAlias: "None"
},
{
commandName: "volume",
commandUsage: ",volume [volume]",
commandDescription: "Changes the volume of music!",
commandAlias: "None"
}
]
}
],
}),
settings: [
]
});
Dashboard.init()
})();
console.log(client_id)
bitbot.login(token)