-
Notifications
You must be signed in to change notification settings - Fork 2
Configuration
This article describes each of the options in the bot's configuration files (found in the configs/ directory), both the behavior they modify and the values they can take.
For certain configurations, you will need to know the IDs
of some members/roles/channels, which you can obtain by following these instructions.
WARNING:
All the keys that have a default value must always have a valid value, or else the bot will have performance problems.
This file contains the bot's login token, which allows it to authenticate against the Discord API and start getting the events generated by the websocket. This token is stored with the data type String. To know how to get and store this token, follow this guide.
These are the main settings of the bot, and they determine fundamental aspects of its general behavior.
Key | Data type | Default value/s | Description |
---|---|---|---|
locale | String | "en" |
It is the language in which the bot dialogs will be displayed (both in the console and in Discord). Head over to the Translation section of the wiki to find out how to choose or add more languages. |
botManagers | String | "" |
It is a list of IDs of roles and members that can perform all the actions allowed by the bot in an unlimited and unrestricted way. |
loggingChannel | String | "" |
This is the channel to which all audit events generated by the bot are sent. |
joinsAndLeavesChannel | String | "" |
This is the channel to which messages indicating that a member has joined or left the guild are sent. |
voiceMovesChannel | String | "" |
This is the channel to which messages indicating that a member has joined, left or changed it's voice channel are sent. |
voiceMovesExcludedChannels | Array <String> | [] |
List of voice channels that will not be taken into account when logging voice channel change events. |
messageHistorySize | Number | 10 |
The size of the message history stored per user. The minimum value is 5 . |
newMemberMode | Number | 0 |
Using this key, you can choose when new members will be welcomed and moderated, whether before they get past the welcome screen, or after they get through it, using the 0 and 1 values respectively. |
pingTreshold | Number | 10000 |
The number of milliseconds that the bot's connection delay with Discord must exceed before warnings are displayed in the console. |
timers | Boolean | true |
Enables (true ) or disables (false ) the timed messages programs. |
This configuration file is designed for the bot to AUTOMATICALLY store information needed for it's functioning.
WARNING: Should not be changed unless you know what you are doing, as it can cause serious malfunctions.
Key | Default value | Data type | Description |
---|---|---|---|
homeGuild | String | None | Stores the ID (snowflake) of the guild the bot is attached to. |
serviceGuildId | String | None | Stores the ID (snowflake) of the guild the bot uses to store system emojis. |
inviteCode | String | None | Stores the invite code generated by the invite command. |
Configuration of sending errors to Sentry (remote monitoring, mainly for development purposes).
Key | Data type | Default value/s | Description |
---|---|---|---|
enabled | Boolean | false |
If set to false , errors will only be sent to the console. If set to true , errors will also be sent to the remote error monitoring software. |
This configuration allows error traces to be sent to the Sentry for monitoring.
Key | Data type/s | Default value | Meaning |
---|---|---|---|
dsn | String | "" |
A DSN tells a Sentry SDK where to send events so the events are associated with the correct project. |
tracesSampleRate | Number | 1.0 |
Sets the sample rate for all transactions using the, with a number between 0 and 1 (including decimals). |
This file controls the configuration of some aspects of the general moderation system.
Key | Default value | Data type | Description |
---|---|---|---|
kickOnBadUsername | false |
Boolean | Enables (true ) or disables (false ) checking the display names of all guild members (newly joined and periodically those already in the guild), and kicking them if banned words are found in them. |
newMemberForbiddenNames | [] |
Array <String> | List of keywords that a new member's username cannot contain. |
includeBannedWords | false |
Boolean | Enables (true ) or disables (false ) checking for the existence of words contained in the bannedWords.json file on the new member's username. |
newMemberTimeDelimiter | 1800000 |
Number | The timestamp (in milliseconds ) after which a member is no longer considered "new" to the guild. |
newSpammerMemberBanDuration | 1209600000 |
Number | Indicates the duration (in milliseconds ) that the bans of people who have just joined the guild (defined on the newMemberTimeDelimiter key) and who have sent guild invites will last. |
attachFilteredMessages | true |
Boolean | Enables (true ) or disables (false ) the function that allows the bot to attach a file with the content of the message to the audit trail of filtered messages. |
This file controls the operation of each of the autonomous moderation filters to which messages sent by guild members are subjected.
Filter | Description |
---|---|
flood | Prevents flooding of text channels with bursts of messages sent in short periods of time. |
crossPost | Prevents repeated text between several text channels. |
swearWords | It is responsible for filtering the messages that contain at least one of the words included in the bannedWords.json file. |
invites | Filters messages that contain invite links to other Discord servers. |
uppercase | Filters those messages whose use of capital letters exceeds the percentage and the minimum values configured. |
links | It's task is to filter the links that members send to text channels. |
massEmojis | It is responsible for filtering messages that exceed a certain number of emojis (unicode or server). |
massMentions | Filters messages that exceed a certain number of role mentions. |
massSpoilers | Filters messages that exceed a certain number of spoilers. |
repeatedText | It's task is to filter those messages that have repetitive text. |
Key | Default value | Data type | Description |
---|---|---|---|
status | false |
Boolean | Enables (true ) or disables (false ) the application of this filter. |
action | 3 |
Number | Chooses how the content of messages will be moderated: - 1 : Deletes the message.- 2 : Warns the member.- 3 : Deletes and warns. |
reason | N/A |
String | Configures the reason the member is warned and/or noted in the infractions database. |
bypassIds | [] |
Array <String> | List of role and member IDs (snowflakes) to which the filter is not applied. |
bypassChannels | [] |
Array <String> | List of channel IDs (snowflakes) in which the filter is not applied. |
Key | Filter/s | Default value/s | Data type/s | Description |
---|---|---|---|---|
filterFiles | crossPost | true |
Boolean | If the sent files will also be checked (this can consume bandwidth depending on the size of the files to be checked!). |
onDM | invites | true |
Boolean | This filter will also apply to private messages received by the bot. |
minimumLength | uppercase | 50 |
Number | The minimum size (in characters ) that a message must have to be filtered. |
percentage | uppercase | 75 |
Number | The percentage of capital letters (with respect to the rest of the text) that the message must have to activate the filter. |
quantity | massEmojis, massMentions, massSpoilers |
20 , 5 , 10
|
Number | The limit of emojis, mentions and spoilers that a message can have. |
maxRepetitions | repeatedText | 5 |
Number | Maximum number of repetitions allowed of the same block of text in a message. |
triggerLimit | flood | 5 |
Number | Minimum number of message history from which the filter takes action. |
triggerLimit | crossPost | 3 |
Number | Minimum number of message history from which the filter takes action. |
maxTimeBetween | flood | 2000 |
Number | Maximum time that must elapse between messages to be susceptible to being recognized as flood. |
In this file, the different sanctions that are applied to members who are sanctioned a certain number of times in a certain period of time, are placed in descending order of verification.
Key | Data type | Possible value | Description |
---|---|---|---|
action | String |
"mute" , "kick" , "tempban" , "ban"
|
The action (sanction) to be applied on the member. |
duration | Number | Milliseconds | Sets the duration of the action (if applicable). |
quantity | Number | Number > 0 | Indicates the number of violations required to apply the action. |
age | Number | Milliseconds | The minimum age (time of life) of the sanctions so that they are added to the total of sanctions. |
You can add new rules by creating new objects following the JSON specification, in the order you want.
This file allows you to add a list with the words that the bot must filter in case they are found in the messages that the members send to the server's text channels, and they must be added as a list of keys (without value) as you can see in the default values for the bannedWords.json file.
In this file the colors of the embed messages that the bot shows to the user are configured.
-
primary
: It is the general color of the bot, used in most cases. -
error
: Used to display the highest severity errors. -
error2
: Used to display errors of minor severity. -
correct
: Used to display correct operations of most importance. -
correct2
: Used to display correct operations of minor importance. -
warning
: Used to display important warnings. -
information
: It is used for informative messages. -
logging
: Is the one used for logging messages. -
polls
: Is the color of the polls embeds.
This is a list of options that define the behavior of interaction commands (those invoked with the /
prefix) used to execute manual actions by the bot.
Key | Data type/s | Default value | Meaning |
---|---|---|---|
forceNameLocale | String | "" |
Replaces command names (not parameters) with those of a particular locale. It must be left blank to use the locale configured in .config/main.locale, or you can specify any of the supported locales. |
chatCommands | Object | N/A |
The configuration of the commands that are invoked by the forward slash / . |
messageCommand | Object | N/A |
The configuration of the commands that are invoked through the context menu of the messages. |
userCommands | Object | N/A |
The configuration of the commands that are invoked through the users context menu. |
ignored | Object | N/A |
The names of the commands that will be ignored when keeping them updated against the Discord API. |
Keys common to all commands of all types:
Key | Data type | Default value/s | Description |
---|---|---|---|
enabled | Boolean |
true or false
|
Defines whether the command is enabled (true ) or fully disabled (false ). |
Specific keys of some commands:
Command/s | Key | Data type | Default value/s | Description |
---|---|---|---|---|
dm | anonynmousMode | Array <String> | [] |
It is the list of roles and members that can send private messages in anonymous mode. |
rmwarn, unmute | removeAny | Array <String> | [] |
These are the roles and members that can remove all warnings from a member at once, or any mutes even if you are not the author of the mute. |
slowmode | unlimitedTime | Array <String> | [] |
Roles and members on this list are allowed to activate slow mode indefinitely. |
slowmode | maxRegularSeconds | Number | "30" |
The default maximum number of seconds that can be used for slow mode (with a maximum of 21600 seconds). |
ban | canSoftBan | Array <String> | [] |
This is the list of roles and members that can delete messages during a ban. |
ban, mute | unlimitedTime | Array <String> | [] |
This is the list of roles and members that can apply temporary sanctions of the duration they want. |
infractions, userinfo | canSeeAny | Array <String> | [] |
It is the list of roles and members that can query the data of all members. |
ban, kick, mute, rmwarn, slowmode, unban, unmute | reasonNotNeeded | Array <String> | [] |
It is the list of roles and members that are not subjected to provide the reason of a moderation action. |
ban, kick, mute | reasonNotNeeded | Array <String> | [] |
It is the list of roles and members that can use moderation commands on bots. |
warn, Warn, Delete and warn | minimumTimeFrequency | Number | 15000 |
It is the minimum time that has to pass before being able to warn the same member (in milliseconds ). |
warn, Warn, Delete and warn | unlimitedFrequency | Array <String> | [] |
It is the list of roles and members that do not have to respect the minimum time between warns. |
leaderboard | hideNotPresent | Boolean | true |
If enabled, members who left the server will be hidden from the leaderboard. |
If you are going to use the same Discord account that uses this bot in conjunction with one or more bots, you may need to prevent this bot from modifying the commands of the rest, so by means of this configuration you can indicate the names of the commands to ignore.
Key | Data type/s | Default value | Meaning |
---|---|---|---|
chatCommands | Array <String> | [] |
The forward slash / commands that will be ignored. |
messageCommand | Array <String> | [] |
The message context menu commands that will be ignored. |
userCommands | Array <String> | [] |
The user context menu commands that will be ignored. |
Through this file you can individually choose which events will trigger messages in the logging channel.
Can be set to
true
(to enable it) or falsefalse
(to disable it).
-
warnedMember
: Generated when a member is warned. -
warnRemoved
: Generated when a warn from a member is removed. -
mutedMember
: Generated when a member is muted. -
unmutedMember
: Generated when a member is unmutted. -
kickedMember
: Generated when a member is kicked. -
kickedBot
: Generated when a bot is kicked. -
bannedMember
: Generated when a member is banned. -
unbannedMember
: Generated when a member is unbanned. -
sentDM
: Generated when sending a DM to a member. -
pollStarted
: Generated when a poll is started. -
pollEnded
: Generated at the end of a poll. -
purgedChannel
: Generated when purging messages from a channel. -
slowmodeChanged
: Generated when changing the slow mode of a channel. -
experienceModified
: Generated when a member's experience points are modified. -
memberJoined
: Generated when a member joins the guild. -
botJoined
: Generated when joining a bot to the guild. -
memberLeaved
: Generated when a member leaves the guild. -
voiceMoves
: Generated when a member joins, leaves or changes it's voice channel.
This settings defines the behavior of the bot regarding the experience point (xp) bonus system based on members activity in text and voice channels.
Key | Data type | Default value | Description |
---|---|---|---|
rewardMessages | Boolean | true |
Enables (true ) or disables (false ) the ability for members to earn XP by typing in text channels. |
rewardVoice | Boolean | true |
Enables (true ) or disables (false ) the ability for members to earn XP by speaking on voice channels. |
notifylevelUpOnChat | Boolean | true |
Enables (true ) or disables (false ) level-up notifications when writing messages (in the same text channel). |
notifylevelUpOnVoice | Boolean | true |
Enables (true ) or disables (false ) level-up notifications when using voice channels (via private messages). |
wontEarnXP | Array <String> | [] |
List of role IDs (snowflakes) which can't earn XP. |
nonXPChannels | Array <String> | [] |
List of text/voice channels IDs (snowflakes) where can't earn XP. |
XPGainInterval | Number | 60000 |
Interval (in milliseconds ) in which XP is gained through voice channel activity. |
minimumTimeBetweenMessages | Number | 5000 |
Time (in milliseconds ) that has to pass before you can get an XP reward for a message. |
minimumXpReward | Number | 5 |
Sets the minimum value of XP that can be earned through a message or voice interval. |
maximumXpReward | Number | 15 |
Sets the maximum value of XP that can be earned per message or voice interval. |
preserveStats | Boolean | true |
Enables (true ) or disables (false ) whether or not users can get XP and role rewards back if they leave the guild and come back later. |
removePreviousRewards | Boolean | true |
Enables (true ) or disables (false ) that once a member levels up, whether or not lower level reward roles are removed. |
This list here relates a level (obtained through XP rewards) and the roles that the member will obtain upon reaching that level.
These are the properties that define a reward:
Key | Data type | Default value | Description |
---|---|---|---|
requiredLevel | Number | N/A | The required lever to earn a reward. |
roles | Array <String> | [] |
List of role IDs (snowflakes) that are going to be rewarded to the member. |
You can add new rewards by creating new objects following the JSON specification.
This file allows you to create timed messages to be sent to certain text channels, at certain intervals, on certain days and after at least X messages from other members.
Key | Mandatory? | Data type | Description |
---|---|---|---|
channelId | Yes | String | Stores the ID (snowflake) of the channel where the message will be sent. |
interval | Yes | Number | Sets how often the message will be sent (in milliseconds ). Possible values are from 60000 to 86400000 . |
weekDays | Yes | Array <Number> | Choose the days of the week on which the message will be sent (with 1 being Monday and 7 being Sunday). |
minimumMessagesSinceLast | Yes | Number | The minimum number of messages that must have been sent on the channel (not from bots) for the timer to run, where 1 is the minimum value and 100 is the maximum value. |
content | Yes | String | The content of the message to send. It supports the following placeholders: {{serverName}} to dynamically fill in the server name, and {{memberCount}} to dynamically fill in the number of members. |
embed | No | Object | An object that stores the options to give a better design to the message. It's optional. |
linkButton | No | Object | An object that stores the options to create a button with a link under the message. It's optional. |
Key | Mandatory? | Data type | Description |
---|---|---|---|
enabled | No | Boolean | Enables (true ) or disables (false ) the use of an embed to format the message. |
color | No | String | Adds a color to the left side stripe of the embedded message. |
title | Yes | String | Adds a title to the embedded message. |
fields | No | Array <Object> | It is an array where you can add fields to the embedded message, up to a maximum of 25 fields. It's optional. |
footer | No | String | Adds a footer to the embedded message. |
Key | Mandatory? | Data type | Description |
---|---|---|---|
name | Yes | String | Adds a title to the field. It supports the following placeholders: {{serverName}} to dynamically fill in the server name, and {{memberCount}} to dynamically fill in the number of members. |
value | Yes | String | Adds the content to the field. It supports the following placeholders: {{serverName}} to dynamically fill in the server name, and {{memberCount}} to dynamically fill in the number of members. |
inline | No | Boolean | Shows (true ) or not (false ) the field inline with the other fields instead of on another line. |
Key | Mandatory? | Data type | Description |
---|---|---|---|
label | Yes | String | Assigns the label to display above the button. |
emoji | No | String | Assigns the emoji to display above the button. |
url | Yes | String | Specifies the URL to which the button will redirect. |
This section details the options that allow you to configure the bot's rich-presence, that is, the information displayed in the bot's profile.
Key | Data type | Default value | Possible values | Description |
---|---|---|---|---|
name | String | "Hi there!" |
Text | Displays custom text in the bot activity. |
membersCount | Boolean | true |
true , false
|
If enabled, displays the number of members (not counting bots) served by the bot. |
status | String | "online" |
"online" , "idle" , "offline" , "dnd"
|
Assigns the connection state of the bot in the presence. |
type | String | "WATCHING" |
"PLAYING" , "STREAMING" , "LISTENING" , "WATCHING" , "CUSTOM" , "COMPETING"
|
Changes the type of activity the bot is performing. |
💡 In case you have any questions about how to use the bot, or anything else related to this repository, you can make use of the support Discord Server.