1
1
const { Intents } = require("discord.js");
2
2
3
+ /* config */
3
4
const config = {
4
5
// Bot Admins, level 9 by default. Array of user ID strings.
5
6
"admins": [],
6
7
7
8
// Bot Support, level 8 by default. Array of user ID strings
8
9
"support": [],
9
10
10
- // Intents the bot needs.
11
- // By default GuideBot needs Guilds, Guild Messages and Direct Messages to work.
12
- // For join messages to work you need Guild Members, which is privileged and requires extra setup.
13
- // For more info about intents see the README.
11
+ /*
12
+ * Intents the bot needs.
13
+ * By default GuideBot needs Guilds, Guild Messages and Direct Messages to work.
14
+ * For join messages to work you need Guild Members, which is privileged and requires extra setup.
15
+ * For more info about intents see the README.
16
+ */
14
17
intents: [ Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.DIRECT_MESSAGES ],
15
18
// Partials your bot may need should go here, CHANNEL is required for DM's
16
19
partials: ["CHANNEL"],
17
20
18
- // Default per-server settings. These settings are entered in a database on first load,
19
- // And are then completely ignored from this file. To modify default settings, use the `conf` command.
20
- // DO NOT REMOVE THIS BEFORE YOUR BOT IS LOADED AND FUNCTIONAL.
21
-
21
+ /*
22
+ * Default per-server settings. These settings are entered in a database on first load,
23
+ * And are then completely ignored from this file. To modify default settings, use the `conf` command.
24
+ * DO NOT REMOVE THIS BEFORE YOUR BOT IS LOADED AND FUNCTIONAL.
25
+ */
22
26
"defaultSettings" : {
23
27
"prefix": "~",
24
28
"modLogChannel": "mod-log",
25
29
"modRole": "Moderator",
26
30
"adminRole": "Administrator",
27
31
"systemNotice": "true", // This gives a notice when a user tries to run a command that they do not have permission to use.
28
- "commandReply": "true", // Toggle this if you want the bot to ping the executioner or not.
32
+ "commandReply": "true", // Toggle this if you want the bot to ping the command executor or not.
29
33
"welcomeChannel": "welcome",
30
34
"welcomeMessage": "Say hello to {{user}}, everyone! We all need a warm welcome sometimes :D",
31
35
"welcomeEnabled": "false"
@@ -37,19 +41,23 @@ const config = {
37
41
// This is the lowest permission level, this is for users without a role.
38
42
{ level: 0,
39
43
name: "User",
40
- // Don't bother checking, just return true which allows them to execute any command their
41
- // level allows them to.
44
+ /*
45
+ * Don't bother checking, just return true which allows them to execute any command their
46
+ * level allows them to.
47
+ */
42
48
check: () => true
43
49
},
44
50
45
51
// This is your permission level, the staff levels should always be above the rest of the roles.
46
52
{ level: 2,
47
53
// This is the name of the role.
48
54
name: "Moderator",
49
- // The following lines check the guild the message came from for the roles.
50
- // Then it checks if the member that authored the message has the role.
51
- // If they do return true, which will allow them to execute the command in question.
52
- // If they don't then return false, which will prevent them from executing the command.
55
+ /*
56
+ * The following lines check the guild the message came from for the roles.
57
+ * Then it checks if the member that authored the message has the role.
58
+ * If they do return true, which will allow them to execute the command in question.
59
+ * If they don't then return false, which will prevent them from executing the command.
60
+ */
53
61
check: (message) => {
54
62
try {
55
63
const modRole = message.guild.roles.cache.find(r => r.name.toLowerCase() === message.settings.modRole.toLowerCase());
@@ -71,19 +79,24 @@ const config = {
71
79
}
72
80
}
73
81
},
82
+
74
83
// This is the server owner.
75
84
{ level: 4,
76
85
name: "Server Owner",
77
- // Simple check, if the guild owner id matches the message author's ID, then it will return true.
78
- // Otherwise it will return false.
86
+ /*
87
+ * Simple check, if the guild owner id matches the message author's ID, then it will return true.
88
+ * Otherwise it will return false.
89
+ */
79
90
check: (message) => {
80
91
const serverOwner = message.author ?? message.user;
81
92
return message.guild?.ownerId === serverOwner.id;
82
93
}
83
94
},
84
-
85
- // Bot Support is a special in between level that has the equivalent of server owner access
86
- // to any server they joins, in order to help troubleshoot the bot on behalf of owners.
95
+
96
+ /*
97
+ * Bot Support is a special in between level that has the equivalent of server owner access
98
+ * to any server they joins, in order to help troubleshoot the bot on behalf of owners.
99
+ */
87
100
{ level: 8,
88
101
name: "Bot Support",
89
102
// The check is by reading if an ID is part of this array. Yes, this means you need to
@@ -102,11 +115,13 @@ const config = {
102
115
return config.admins.includes(botAdmin.id);
103
116
}
104
117
},
105
-
106
- // This is the bot owner, this should be the highest permission level available.
107
- // The reason this should be the highest level is because of dangerous commands such as eval
108
- // or exec (if the owner has that).
109
- // Updated to utilize the Teams type from the Application, pulls a list of "Owners" from it.
118
+
119
+ /*
120
+ * This is the bot owner, this should be the highest permission level available.
121
+ * The reason this should be the highest level is because of dangerous commands such as eval
122
+ * or exec (if the owner has that).
123
+ * Updated to utilize the Teams type from the Application, pulls a list of "Owners" from it.
124
+ */
110
125
{ level: 10,
111
126
name: "Bot Owner",
112
127
// Another simple check, compares the message author id to a list of owners found in the bot application.
0 commit comments