[AB-78] adding new concept of feature modes, with splitting it up to new commands and default mode concept

refactoring command received handler to only load the entities in the same thread as the actual executed commands, so that user initiated context contains valid references from the same thread
updating documentation
fixing issue when the result of role calculation result in no experience role id
This commit is contained in:
Sheldan
2020-10-15 00:42:42 +02:00
parent bc9afc9bfc
commit 0aa7d3f036
134 changed files with 1934 additions and 473 deletions

View File

@@ -102,9 +102,15 @@ Make a role immune against a command::
Enforce the role restrictions of commands::
* Usage: `restrict <featureName|commandName>`
* Description: Causes the role restrictions for a all commands in the `feature`/the `command` to be in effect again.
Changing the mode of a feature::
* Usage: `setMode <featureName> <newMode>`
* Description: Changes the mode of feature `featureName` to `newMode`.
Enabling a feature mode::
* Usage: `enableMode <featureName> <mode>`
* Description: Enables the mode `mode` in feature `featureName`.
Disabling a feature mode::
* Usage: `disableMode <featureName> <mode>`
* Description: Disables the mode `mode` in feature `featureName`.
Listing all feature modes::
* usage `featureModes [feature]`
* Description: Lists all of the currently available feature modes and the feature they are associated with. If `feature` is given, it only lists the feature modes of this feature. The output also includes whether or not the current mode is enabled and if this value comes from the default configuration.
Setting up a feature with an interactive wizard::
Usage: `setup <featureName>`
* Description: Starts an interactive wizard to configure the necessary properties and post targets of a feature. Also includes custom steps. Closes with a summary page to see all changes.
@@ -118,4 +124,11 @@ A command can take a member as a target, for example `ban`. If a role is conside
* Warn
* Mute
While a role can be made immune for any command, only these commands actually use this information.
While a role can be made immune for any command, only these commands actually use this information.
.What is a feature mode?
A feature mode is a very specific way in which a feature behaves for a certain decision. These feature modes can be defined for each server and are directly bound to a feature.
These feature modes influence the availability of commands or general behavior of features.
An example of a feature mode is mod mail logging: If the feature mode `log` of mod mail is disabled, no thread will be logged and the separate command `closeNoLog` will not be available in the first place, because it will behave the same as the normal `close` command.
If the feature mode is enabled, the messages from the thread are logged in the respective post target and the command will be available.

View File

@@ -3,8 +3,8 @@
Feature key: `moderation`
==== Post targets
`banLog`:: Will be used to send a log message containing information about the ban for both `ban` and `banId`. Will still ban if not setup.
`kickLog`:: Will be used to send a log message containing information about the kick. Will still kick if not setup.
`banLog`:: target of the log message containing information about the ban for both `ban` and `banId`. Will still ban if not setup.
`kickLog`:: target of the log message containing information about the kick. Will still kick if not setup.
==== Commands
Ban a member::
@@ -42,7 +42,7 @@ This feature can be used to warn specific users if they did something not allowe
Feature key: `warnings`
==== Post targets
`warnLog`:: Will be used to send a log message containing information about the warn.
`warnLog`:: target of the log message containing information about the warn.
`decayLog`:: Will be used when all the warnings are decayed by a command and logging has been selected.
==== Commands
@@ -77,7 +77,7 @@ Feature key: `warnDecay`
`decayDays` The amount of days after which a warning gets decayed. Default: 90
==== Post targets
`decayLog`:: Will be used to send the log message containing the information in case a warning is decayed.
`decayLog`:: target of the log message containing the information in case a warning is decayed.
==== Commands
Decaying all warnings if necessary::
@@ -93,7 +93,7 @@ If the user leaves the guild and rejoins, the mute role will be re-applied.
Feature key `muting`
==== Post targets
`muteLog`:: Will be used to send the log message containing the information in case a member was muted and when the mute ended automatically.
`muteLog`:: target of log message containing the information in case a member was muted and when the mute ended automatically.
==== Commands
Muting a user::
@@ -117,11 +117,17 @@ The logging includes:
Feature key `logging`
Deleted message logging:: When a message is deleted, the content of the message and the possible attachments of said message will be logged. Post target `deleteLog`.
==== Post targets
`deleteLog`:: target for the messages containing information about a deleted message.
`editLog`:: target for the messages containing information about an edited message.
`joinLog`:: target for the messages containing information about an user joining the server.
`leaveLog`:: target or the messages containing information about an user leaving the server.
Deleted message logging:: When a message is deleted, the content of the message and the possible attachments of said message will be logged.
Edited message logging:: When a message is edited, the previous content of the message and the new content of the message will be logged.
This does not work if the message was sent before the bot was started. Post target `editLog`.
Member joining logging:: When a member joins the guild, a message indicating this is send. Post target `joinLog`.
Member leaving logging:: When a member leaves the guild, a message indicating this is send. Post target `leaveLog`.
This does not work if the message was sent before the bot was started.
Member joining logging:: When a member joins the guild, a message indicating this is send.
Member leaving logging:: When a member leaves the guild, a message indicating this is send.
=== User notes

View File

@@ -18,15 +18,15 @@ Feature key: `modmail`
==== Relevant system configuration
`modmailCategory`:: The category on the server which is used to hold the text channels representing the threads
`modMailClosingText`::The text being used when notifying the user when a thread is closed.
`modMailClosingText`:: The text being used when notifying the user when a thread is closed.
==== Post targets
`modmailPing`:: Will be used to send the notification when a new thread is opened.
`modmailLog`:: Will be used to log the interactions when a thread is closed.
==== Modes
`log`:: The messages should be logged into the `modmailLog` post target when the thread is closed (by the respective commands)
`nogLog`:: The messages should not be logged into the `modmailLog` post target when the thread is closed.
==== Feature modes
`log`:: If this is enabled, the messages should be logged into the `modmailLog` post target when the thread is closed (by the respective commands). This is required for the command `closeNoLog` to be available.
==== Emotes

View File

@@ -40,6 +40,7 @@ Feature key: `starboard`
** Second place: `starboardBadge2`
** Third place: `starboardBadge3`
==== Relevant system configuration
`starLvl1` The amount of stars necessary to appear on the starboard. Default: 5
@@ -49,6 +50,9 @@ Feature key: `starboard`
`starLvl4` The amount of stars necessary in order for the level 4 emote to be used in the starboard post. Default: 17
==== Post targets
`starboard`:: The target used for the messages containing the starboard posts with the current star amount
==== Commands
Showing starboard statistics::
* Usage `starStats`
@@ -60,6 +64,9 @@ This feature provides the ability for members to post suggestions containing tex
Feature key: `suggestion`
==== Post targets
`suggestions`:: the target of the messages containing the suggestions
==== Emotes
* for up-voting a suggestion: `suggestionYes`
* for down-voting a suggestion: `suggestionNo`