mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-15 20:16:34 +00:00
[AB-217] adding documentation for profanity regex and renaming command for deleting profanity regex from a group
This commit is contained in:
@@ -17,7 +17,7 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class DeleteProfanityRegex extends AbstractConditionableCommand {
|
public class RemoveProfanityRegex extends AbstractConditionableCommand {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProfanityService profanityService;
|
private ProfanityService profanityService;
|
||||||
@@ -33,12 +33,12 @@ public class DeleteProfanityRegex extends AbstractConditionableCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CommandConfiguration getConfiguration() {
|
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();
|
Parameter profanityNameParameter = Parameter.builder().name("profanityName").type(String.class).templated(true).build();
|
||||||
List<Parameter> parameters = Arrays.asList(profanityGroupParameter, profanityNameParameter);
|
List<Parameter> parameters = Arrays.asList(profanityGroupParameter, profanityNameParameter);
|
||||||
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
|
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
|
||||||
return CommandConfiguration.builder()
|
return CommandConfiguration.builder()
|
||||||
.name("deleteProfanityRegex")
|
.name("removeProfanityRegex")
|
||||||
.module(ConfigModuleDefinition.CONFIG)
|
.module(ConfigModuleDefinition.CONFIG)
|
||||||
.parameters(parameters)
|
.parameters(parameters)
|
||||||
.templated(true)
|
.templated(true)
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<column name="feature_id" valueComputed="${coreFeature}"/>
|
<column name="feature_id" valueComputed="${coreFeature}"/>
|
||||||
</insert>
|
</insert>
|
||||||
<insert tableName="command">
|
<insert tableName="command">
|
||||||
<column name="name" value="deleteProfanityRegex"/>
|
<column name="name" value="removeProfanityRegex"/>
|
||||||
<column name="module_id" valueComputed="${configModule}"/>
|
<column name="module_id" valueComputed="${configModule}"/>
|
||||||
<column name="feature_id" valueComputed="${coreFeature}"/>
|
<column name="feature_id" valueComputed="${coreFeature}"/>
|
||||||
</insert>
|
</insert>
|
||||||
|
|||||||
@@ -149,6 +149,21 @@ Create a server specific alias::
|
|||||||
Delete a server specific alias::
|
Delete a server specific alias::
|
||||||
* Usage: `deleteAlias <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.
|
* 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?
|
.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.
|
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.
|
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'.
|
||||||
Reference in New Issue
Block a user