forked from Leref/DBD.JS-music-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
49 lines (41 loc) · 932 Bytes
/
index.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
const dbd = require("dbd.js")
const config = require("./config.json")
const bot = new dbd.Bot({
sharding: false,
shardAmount: 2,
token: config.token,
prefix: ['$getServerVar[prefix]', '!']
})
bot.onMessage({
guildOnly: true
})
//Music Event
bot.onMusicStart()
bot.musicStartCommand({
channel: "$channelID",
code: `
$color[GREEN]
$author[Now Playing]
$description[Playing $songInfo[title]]`
})
const fs = require('fs')
const folders = fs.readdirSync("./commands/")
for (const files of folders) {
const folder = fs.readdirSync(`./commands/${files}/`).filter(file => file.endsWith(".js"))
for (const commands of folder) {
const command = require(`./commands/${files}/${commands}`)
bot.command({
name: command.name,
aliases: command.aliases,
code: command.code
}) // Variables
bot.variables({
prefix: "!"
}) // Status
bot.status({
text: "to $serverCount servers 🎶",
type: "LISTENING",
time: 12
})
}
}