forked from A1igator/Evo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-example.js
87 lines (78 loc) · 1.91 KB
/
config-example.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
const config = {
ownerID: '111111111111111111',
admins: [],
token: '',
dashboard: {
oauthSecret: '',
callbackURL: '',
sessionSecret: '',
domain: 'localhost',
port: 808,
},
defaultSettings: {
prefix: '-',
modLogChannel: 'mod-log',
modRole: 'Moderator',
adminRole: 'Administrator',
systemNotice: 'true',
welcomeChannel: 'welcome',
welcomeMessage: 'Welcome {{user}}!',
welcomeEnabled: 'false',
whitelistEnabled: 'false',
whitelistedCommands: 'set,help',
enableAutomod: 'false',
},
permLevels: [
{
level: 0,
name: 'User',
check: () => true,
},
{
level: 2,
name: 'Moderator',
check: (message) => {
try {
const modRole = message.guild.roles.find(
r => r.name.toLowerCase() === message.settings.modRole.toLowerCase(),
);
if (modRole && message.member.roles.has(modRole.id)) {
return true;
}
} catch (e) {
return false;
}
},
},
{
level: 3,
name: 'Administrator',
check: (message) => {
try {
const adminRole = message.guild.roles.find(
r => r.name.toLowerCase() === message.settings.adminRole.toLowerCase(),
);
return (adminRole && message.member.roles.has(adminRole.id)) || message.member.hasPermission('ADMINISTRATOR');
} catch (e) {
return false;
}
},
},
{
level: 4,
name: 'Server Owner',
check: message => (message.channel.type === 'text' ? (message.guild.ownerID === message.author.id) : false),
},
{
level: 9,
name: 'Bot Admin',
check: message => config.admins.includes(message.author.id),
},
{
level: 10,
name: 'Bot Owner',
check: message => message.client.config.ownerID === message.author.id,
},
],
};
module.exports = config;