-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
69 lines (53 loc) · 1.27 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
const { Voice, LoadCommands, AoiClient } = require("aoi.js");
const config = require("./config.json");
const bot = new AoiClient({
token: config.token,
prefix: [config.prefix, "$getServerVar[prefix]"],
intents: ["GUILDS", "GUILD_MESSAGES", "GUILD_VOICE_STATES"],
database: {
db: require("aoi.db"),
type: "aoi.db",
path: "./database/",
tables: ["main"],
extraOptions: {
dbType: "KeyValue",
},
},
});
// Loader setup
const loader = new LoadCommands(bot);
// Voice setup
const voice = new Voice(
bot,
{
cache: {
cacheType: "Memory",
enabled: true,
},
},
true,
);
// Panel setup
const { Panel } = require("@akarui/aoi.panel")
const panel = new Panel({
username: config["panel-username"],
password: config["panel-password"],
secret: config["panel-secret"],
port: config["panel-port"],
bot: bot,
mainFile: "index.js",
commands: "commands"
})
// Events
bot.onMessage();
bot.onInteractionCreate();
voice.onTrackStart();
panel.loadPanel()
panel.onError()
// Variable setup
bot.variables(require("./util/variables.js"));
// Status setup
bot.status(require("./util/status.js"));
// Command Loader
loader.load(bot.cmd, "./commands/"); //bot cmds
loader.load(voice.cmd, "./commands/voice/"); //voice cmds