This repository has been archived by the owner on Feb 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbot.js
98 lines (74 loc) · 3.08 KB
/
bot.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
const Discord = new require(`discord.js`)
const bot = new Discord.Client()
const fs = require("fs");
const config = JSON.parse(fs.readFileSync("./Settings/config.json", "utf8"))
const auth = JSON.parse(fs.readFileSync("./Settings/auth.json", "utf8"))
bot.login(auth.token)
var status = `Use ${config.prefix}help | DC24 Bot v1.6.1`
var color = `#BA68C8`
bot.on('ready', async function() {
console.log(`${bot.user.tag} is online and running!`)
bot.user.setActivity(status)
})
bot.on('message', async function(msg) {
var command = msg.content.split(" ")[0].slice(config.prefix.length).toLowerCase()
var args = msg.content.split(" ").slice(1);
let suffix = args.join(" ")
if(msg.author.bot || !msg.content.startsWith(config.prefix)) {
return;
}
if (command === "patchers") {
require(`./Commands/patchers.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "guide") {
require(`./Commands/patchers.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "dns") {
require(`./Commands/dns.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "error") {
require(`./Commands/error.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "help") {
require(`./Commands/help.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "ping") {
require(`./Commands/ping.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "info") {
require(`./Commands/info.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "code") {
require(`./Commands/code.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "eval") {
require(`./Commands/eval.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "avatar") {
require(`./Commands/avatar.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "ban") {
require(`./Commands/ban.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "kick") {
require(`./Commands/kick.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "icon") {
require(`./Commands/icon.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "server") {
require(`./Commands/server.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "user") {
require(`./Commands/user.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "stats") {
require(`./Commands/stats.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "patch") {
require(`./Commands/patch.js`).run(bot, config, msg, args, suffix, Discord, color)
}
if (command === "evc-suggest") {
require(`./Commands/evc-suggest.js`).run(bot, config, msg, args, suffix, Discord, color)
}
})