-
Notifications
You must be signed in to change notification settings - Fork 11
Config File
A sample configuration file with default values is provided and can be used by removing .sample from the extension of the file. The various fields in this YAML file will determine how various aspects of the bot will work.
The Prefix and Token fields are relatively straightforward.
For example, if Prefix is set to ., then the commands are in the form of .[commandName].
Meanwhile, the Token is a valid Discord bot token. To get one, see https://discordapp.com/developers/applications or https://www.writebots.com/discord-bot-token/.
Reminder: Never share your Discord Bot Token with anyone.
The Activity fields are for the bot's custom status. For example, the status could be "Playing 🦉 Simulator".
For the available Types, see https://github.com/discord-net/Discord.Net/blob/dev/src/Discord.Net.Core/Entities/Activities/ActivityType.cs.
For the available Flags, see https://github.com/discord-net/Discord.Net/blob/dev/src/Discord.Net.Core/Entities/Activities/ActivityProperties.cs.
For more information on the Activity fields in general, see https://github.com/discord-net/Discord.Net/blob/dev/src/Discord.Net.Core/Entities/Activities/IActivity.cs.
This field specifies the server ID that the modmail module will be used on. The ModMailServer field determines which server contains the channel that notifications are being sent to. By default it is set to zero.
The DbPath field specifies the path to the database file. This field must have the file extension provided. Alternatively, this path can be specified as a command line argument.
These fields are used if the automatic database backup service is desired.
- The
BackupOutputPathfield specifies where the folder where database backups will be stored. - The
BackupScriptfield determines the location of the external script which handles the backups. This backup system supports either Linux shell or Windows powershell. The extension does not need to be provided. - The
NumberOfBackupsfield determines the number of backups that the system will store at any time.
The bot is configured to randomly respond to messages containing specific text. These fields handle the random responses.
The random responses are stored as a list with three parameters that are used.
- The
Inputparameter specifies the regex that is used. This regex will return matches if it is successful. It should be noted that the escape character (\) must be used to escape special characters. - The
Responsefield specifies what the bot will respond with if there is a regex match - The
Probabilityfield specifies the probability from 0 to 1 that the bot will respond with the response if there is a regex match.
These fields are used to configure the values that are used within the raid protection service.
-
MaxMentionCountspecified the maximum number of mentions that a user can put in one message before the bot takes action on the user -
ForgivenDurationspecifies the duration, in milliseconds, of when a user is forgiven after they have triggered the raid protection -
DurationForMaxMessagesspecifies the rate at which users can send messages. This will trigger if there are more than 5 messages sent from the same user within this time frame. -
MaxNumberOfPunishmentsspecifies the number of times a user is warned by the raid protection system before they are muted/banned -
BotMessageDeletionDelayspecifies the duration between the bot sending a warning message, and the message being deleted -
RemovedPunishedUserDelayspecifies the delay before a user is removed from the list of punished users. If too many users are in the punished users list, the system warns the mods of a potential raid. -
MaxNumberPunishedUsersspecified the maximum number of users that can exist in the list of punished users before the bot informs the moderators of a potential raid. -
MaxNumberOfJoinsspecifies the maximum number of joins that can occur within a specified time frame before the moderators are alerted about a possible raid -
UserJoinsDelayspecifies the duration in which a user is removed from the user join list after they join the server -
MaxNumberEmojisspecified the maximum number of custom and unicode emotes that can exist in a message before the bot warns the user -
MaxNumberSequentialCharactersspecifies the maximum number of times a letter can be repeated in a row before the bot warns the user