Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.

Commit 649e8ce

Browse files
author
Static
authored
convert comments to multi-line comments (#158)
This is a somewhat trivial change, but it just makes the multi-line comments much more readable, and easier-to-follow. None of the actual comments were changed, other than `'executioner'`, which was changed to `'command's executor'` for clarity.
1 parent 7e8d83f commit 649e8ce

File tree

1 file changed

+40
-25
lines changed

1 file changed

+40
-25
lines changed

config.js.example

+40-25
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
11
const { Intents } = require("discord.js");
22

3+
/* config */
34
const config = {
45
// Bot Admins, level 9 by default. Array of user ID strings.
56
"admins": [],
67

78
// Bot Support, level 8 by default. Array of user ID strings
89
"support": [],
910

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+
*/
1417
intents: [ Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.DIRECT_MESSAGES ],
1518
// Partials your bot may need should go here, CHANNEL is required for DM's
1619
partials: ["CHANNEL"],
1720

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+
*/
2226
"defaultSettings" : {
2327
"prefix": "~",
2428
"modLogChannel": "mod-log",
2529
"modRole": "Moderator",
2630
"adminRole": "Administrator",
2731
"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.
2933
"welcomeChannel": "welcome",
3034
"welcomeMessage": "Say hello to {{user}}, everyone! We all need a warm welcome sometimes :D",
3135
"welcomeEnabled": "false"
@@ -37,19 +41,23 @@ const config = {
3741
// This is the lowest permission level, this is for users without a role.
3842
{ level: 0,
3943
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+
*/
4248
check: () => true
4349
},
4450

4551
// This is your permission level, the staff levels should always be above the rest of the roles.
4652
{ level: 2,
4753
// This is the name of the role.
4854
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+
*/
5361
check: (message) => {
5462
try {
5563
const modRole = message.guild.roles.cache.find(r => r.name.toLowerCase() === message.settings.modRole.toLowerCase());
@@ -71,19 +79,24 @@ const config = {
7179
}
7280
}
7381
},
82+
7483
// This is the server owner.
7584
{ level: 4,
7685
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+
*/
7990
check: (message) => {
8091
const serverOwner = message.author ?? message.user;
8192
return message.guild?.ownerId === serverOwner.id;
8293
}
8394
},
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+
*/
87100
{ level: 8,
88101
name: "Bot Support",
89102
// 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 = {
102115
return config.admins.includes(botAdmin.id);
103116
}
104117
},
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+
*/
110125
{ level: 10,
111126
name: "Bot Owner",
112127
// Another simple check, compares the message author id to a list of owners found in the bot application.

0 commit comments

Comments
 (0)