This repository has been archived by the owner on Sep 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
config.js
67 lines (59 loc) · 1.53 KB
/
config.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
const config = {
"prefix": "=",
"token": "BOT_TOKEN",
"owner": "ID",
"admins": [],
permLevels: [
{ level: 0,
name: "User",
check: () => true
},
{ level: 2,
name: "Moderator",
check: (message) => {
try {
if (message.member.hasPermission("MANAGE_MESSAGES") || message.member.hasPermission("MANAGE_GUILD")) {
return true;
} else {
return false;
}
} catch (e) {
return false;
}
}
},
{ level: 3,
name: "Administrator",
check: (message) => {
try {
if (message.member.hasPermission("ADMINISTRATOR") || message.member.roles.get(message.guild.settings.adminRole) !== undefined) {
return true;
} else {
return false;
}
} catch (e) {
return false;
}
}
},
{ level: 4,
name: "Server Owner",
check: (message) => {
if (message.channel.type === "text" && message.guild.ownerID) {
if (message.guild.ownerID === message.author.id) return true;
} else {
return false;
}
}
},
{ level: 9,
name: "Bot Admin",
check: (message) => config.admins.includes(message.author.id)
},
{ level: 10,
name: "Bot Owner",
check: (message) => config.owner === message.author.id
}
]
};
module.exports = config;