-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
107 lines (74 loc) · 1.91 KB
/
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
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
var fs = require('fs')
const { Voice, LoadCommands, Bot } = require("aoi.js");
const aoi = require("aoi.js")
const bot = new aoi.Bot({
token: "BOT_TOKEN",
prefix: "BOT_PREFIX",
intents: ["GUILDS", "GUILD_MESSAGES", "GUILD_VOICE_STATES"]
})
const aoidash = require('aoi.js-panel')
const dash = new aoidash.Dash(bot, {
port: 8080,
command: './commands', //your command handler
username: "", //username to login to dashboard
password: "" //password to login to dashboard
})
dash.start()
//Event
bot.onMessage()
//cmd handeler
var reader = fs.readdirSync("./commands/").filter(file => file.endsWith(".js"))
for (const file of reader) {
const command = require(`./commands/${file}`)
bot.command({
name: command.name,
code: command.code
})
}
var reader = fs.readdirSync("./moderation/").filter(file => file.endsWith(".js"))
for (const file of reader) {
const command = require(`./moderation/${file}`)
bot.command({
name: command.name,
code: command.code
})
}
var reader = fs.readdirSync("./voice/").filter(file => file.endsWith(".js"))
for (const file of reader) {
const command = require(`./voice/${file}`)
bot.command({
name: command.name,
code: command.code
})
}
//aoi.js
const loader = new LoadCommands(bot);
const voice = new Voice(
bot,
{
cache: {
cacheType: "Memory",//Disk
enabled: true,
//directory : "music", only for Disk type
},
},
false, //to enable pruneMusic
);
voice.onTrackStart();
loader.load(bot.cmd, "./commands/"); //bot cmds
loader.load(voice.cmd, "./voice/"); //voice cmds
//Ping cmd
bot.command ({
name: "ping",
code : `$title[1;Pong]
$description[1;$pingms]`
})
//Ping cmd on Slash
bot.interactionCommand({
name: "ping",
prototype: 'slash',
code: `$interactionReply[Pong! $pingms]`
})
//No need to give any credits :)
//Fucking Shit
console.log("Coded by daddy Hyper")