-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
48 lines (40 loc) · 1.08 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
const { Client, Discord, Collection, ClientUser } = require('discord.js')
const client = new Client();
const fs = require("fs")
const config = require("./config/botconfig.json")
const prefix = config.Client.prefix
const moment = require("moment")
const {
joinVoice,
React,
Status,
commandsFun,
commandrun,
msgUser,
userMsg,
Reconnect,
} = require("./function")
// const menuRole = require("./rolepick")
// const Radio = require("./Radio")
// Radio(client);
// menuRole(client)
client.login(config.Client.Token)
client.commands = new Collection();
client.aliases = new Collection();
client.on("ready", () => {
console.log(client.user.tag);
joinVoice(client)
Status(client)
})
commandsFun(fs, client)
client.on("message", async (message) => {
React(message)
commandrun(message, client, prefix)
msgUser(message, client)
userMsg(message, client)
});
client.on("voiceStateUpdate", async (newState , oldState) => {
Reconnect(newState, oldState, client)
})
client.on("warn", (info) => console.log(info));
client.on("error", console.error);