[AB-217] adding documentation for profanity regex and renaming command for deleting profanity regex from a group

This commit is contained in:
Sheldan
2021-04-04 18:04:23 +02:00
parent 602f0d5bf4
commit 19baf981f1
3 changed files with 24 additions and 5 deletions

View File

@@ -17,7 +17,7 @@ import java.util.Arrays;
import java.util.List;
@Component
public class DeleteProfanityRegex extends AbstractConditionableCommand {
public class RemoveProfanityRegex extends AbstractConditionableCommand {
@Autowired
private ProfanityService profanityService;
@@ -33,12 +33,12 @@ public class DeleteProfanityRegex extends AbstractConditionableCommand {
@Override
public CommandConfiguration getConfiguration() {
Parameter profanityGroupParameter = Parameter.builder().name("profanityGroup").type(String.class).templated(true).build();
Parameter profanityGroupParameter = Parameter.builder().name("profanityGroupName").type(String.class).templated(true).build();
Parameter profanityNameParameter = Parameter.builder().name("profanityName").type(String.class).templated(true).build();
List<Parameter> parameters = Arrays.asList(profanityGroupParameter, profanityNameParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder()
.name("deleteProfanityRegex")
.name("removeProfanityRegex")
.module(ConfigModuleDefinition.CONFIG)
.parameters(parameters)
.templated(true)

View File

@@ -25,7 +25,7 @@
<column name="feature_id" valueComputed="${coreFeature}"/>
</insert>
<insert tableName="command">
<column name="name" value="deleteProfanityRegex"/>
<column name="name" value="removeProfanityRegex"/>
<column name="module_id" valueComputed="${configModule}"/>
<column name="feature_id" valueComputed="${coreFeature}"/>
</insert>

View File

@@ -149,6 +149,21 @@ Create a server specific alias::
Delete a server specific alias::
* Usage: `deleteAlias <alias>`
* Description: Deletes the server specific alias identified by `alias`. It is not possible to delete pre-defined aliases. If `alias` does not exist, an error message is shown.
Creating a profanity group::
* Usage: `createProfanityGroup <profanityGroupName>`
* Description: Creates a profanity group with the given `profanityGroupName`. This name must be unique within the server.
Adding a profanity regex to a profanity group::
* Usage: `addProfanityRegex <profanityGroupName> <profanityName> <regex> [replacement]`
* Description: Adds a profanity regex identified by `profanityName` to the profanity group identified by `profanityGroupName`. The regex to be used is in `regex`. Depending on how the regex is used, you can define a `replacement`, with which a found text will be replaced. The `profanityName` must be unique within the profanity group.
Show the current profanity configuration::
* Usage: `showProfanityConfig`
* Description: Shows the current profanity configuration for the current server, including all profanity groups and profanity regex.
Removing a profanity regex from a profanity group::
* Usage: `removeProfanityRegex <profanityGroupName> <profanityName>`
* Description: Removes the profanity regex identified by `profanityName` from the profanity group identified by `profanityGroupName`.
Deleting a profanity group::
* Usage: `deleteProfanityGroup <profanityGroupName>`
* Description: Deletes the profanity group identified by `profanityGroupName` and all profanity regexes within.
.What does it mean if a role is immune?
@@ -166,4 +181,8 @@ A feature mode is a very specific way in which a feature behaves for a certain d
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.
If the feature mode is enabled, the messages from the thread are logged in the respective post target and the command will be available.
.What is a profanity group?
A profanity group is just a container for various regexes. They are grouped together in order to be identified together and kept organized.
Each profanity regex within that group has another identified. For example a regex group handles the word 'test'. Then a profanity regex is for all lower cases, this regex can be named 'lower', and the regex group is then named 'test'.