added commands to documentation

small improvements in the documentation
added alias to listDisabledExperienceRoles command
This commit is contained in:
Sheldan
2020-06-02 16:35:02 +02:00
parent 563564aabe
commit 072072dffc
9 changed files with 61 additions and 16 deletions

View File

@@ -39,7 +39,7 @@ public class DisableExpGain extends AbstractConditionableCommand {
@Override
public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("user").templated(true).type(Member.class).build());
parameters.add(Parameter.builder().name("member").templated(true).type(Member.class).build());
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder()
.name("disableExpGain")

View File

@@ -39,7 +39,7 @@ public class EnableExpGain extends AbstractConditionableCommand {
@Override
public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("user").templated(true).type(Member.class).build());
parameters.add(Parameter.builder().name("member").templated(true).type(Member.class).build());
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder()
.name("enableExpGain")

View File

@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@Component
@@ -54,11 +55,13 @@ public class ListDisabledExperienceRoles extends AbstractConditionableCommand {
public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>();
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
List<String> aliases = Arrays.asList("lsDisEpRoles");
return CommandConfiguration.builder()
.name("listDisabledExperienceRoles")
.module(ExperienceModule.EXPERIENCE)
.templated(true)
.causesReaction(true)
.aliases(aliases)
.parameters(parameters)
.help(helpInfo)
.build();

View File

@@ -3,8 +3,8 @@
The core feature contains necessary commands in order for Abstracto to function and be configured.
==== Emotes
* as a reaction in case the command completed successfully `successReaction`
* as a reaction in case the command did not complete successfully `warnReaction`
* reaction emote in case the command completed successfully `successReaction`
* reaction emote in case the command did not complete successfully `warnReaction`
==== Commands
Help::
@@ -57,7 +57,7 @@ Adding a channel to a channel group::
* Usage: `addToChannelGroup <groupName> <channel>`
* Description: Adds the `channel` to the channel group identified by the `groupName`. It is not possible for a channel to be in a group twice.
* Aliases: `addTChGrp`, `chGrpCh+`
* Example: `addToChannelGroup group1 #general` to add the channel #general to the group group1
* Example: `addToChannelGroup group1 #general` to add the channel #general to the group `group1`
Removing a channel from a channel group::
* Usage: `removeFromChannelGroup <groupName> <channel>`
* Description: Removes the `channel` from the channel group identified by `groupName`.
@@ -65,14 +65,14 @@ Removing a channel from a channel group::
* Example: `removeFromChannelGroup group1 #general` to remove the channel #general from the group `group1`
Deleting a channel group::
* Usage: `deleteChannelGroup <key>`
* Description: Deletes the channel group identifies by `key`. This will also remove all associated channels from this group. This command fails, if the group is used in other features and referenced.
* Description: Deletes the channel group identified by `key`. This will also remove all associated channels from this group. This command fails, if the group is used in other features and referenced.
* Aliases: `-ChGroup`
Disabling a command in a group::
* Usage: `disableCommand <commandName> <groupName>`
* Description: Disables the command identified by `commandName` in the channel group `groupName`. A command is considered disabled in a specified channel, if the command is disabled in *all* the groups the channel is in.
* Example: `disableCommand warn group1` to disable the command `warn` in the group `group1`
Enabling a command in a group::
* Usage: `enableCommand <commandname> <groupName>`
* Usage: `enableCommand <commandName> <groupName>`
* Description: Enables the command identified by `commandName` in the channel group `groupName`. A command is considered enabled in a specified channel, if the command is enabled in *any* the groups the channel is in.
* Example: `enableCommand warn group1` to enable the command `warn` in the group `group1`
Showing all available channel groups and the respective channels::
@@ -101,9 +101,12 @@ 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:
Changing the mode of a feature::
* Usage: `setMode <featureName> <newMode>`
* Description: Changes the mode of feature `featureName` to `newMode`.
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.
.What does it mean if a role is immune?

View File

@@ -4,6 +4,9 @@ This feature contains the ability to track experience of users on the server and
The experience is awarded once per minute and is calculated by asciimath:[`\text{rand}(\text{minExp}, \text{maxExp}) * \text{expScale}`].
Only one role is awarded at a time and the past unlocked roles are not given to the members.
==== Necessary bot permissions
`MANAGE_ROLES` in order to award members with roles
==== Relevant system configuration
`minExp` The lower bound of the awarded base experience. Default: 10.
@@ -41,4 +44,26 @@ This command can run for a longer period of time, depending on the amount of mem
Remove a role from being awarded at a certain level::
* Usage: `unSetExpRole <role>`
* Description: Removes this role from the experience tracking, removes the role from all members previously owning it and recalculates their new role according to the configuration.
This will provide a status update message displaying the process.
This will provide a status update message displaying the process.
Disable experience gain for a certain role::
* Usage: `disableExpForRole <role>`
* Description: Disables any experience gain for members with this role. They will not gain any experience until the role is removed or it is possible for the role to gain experience again.
If a member has *any* role of the ones for which experience is disabled, the member will not gain experience.
Enable experience gain for a certain role::
* Usage: `enableExpForRole <role>`
* Description: Enables experience gain for members with this role again.
List roles for which experience gain is disabled::
* Usage: `listDisabledExperienceRoles`
* Description: Lists the roles for which experience gain is disabled on this server.
* Aliases: `lsDisEpRoles`
Disable experience gain for specific member::
* Usage: `disableExpGain <member>`
* Description: Disables the ability to gain experience for this certain member.
Enable experience gain for specific member::
* Usage: `enableExpGain <member>`
* Description: Enables the ability to gain experience for this certain member.

View File

@@ -29,7 +29,6 @@ Change the slow mode in a channel::
* Usage: `slowmode <duration> [channel]`
* Description: This command sets the slow mode in the `channel` to the given `duration`. This command uses duration parsing. The `channel` is optional and if none is provided, the current channel is used.
* Example: `slowMode 1h2m3s #general` in order to set the slow mode in channel `general` to 1 hour 2 minutes and 3 seconds (the #general is a user mention)
* Required bot permission: `MANAGE_CHANNEL` in the respective channel
=== Warning
@@ -53,7 +52,7 @@ Listing the warnings of users::
This uses a paginated output, which means multiple pages in case there are more warnings to display. This will also display the date the warning was decayed if applicable.
Showing your warnings::
* Usage: `myWarnings`
* Description: Displays the warnings of the user executing on the server. This will show both active and total warnings.
* Description: Displays the amount of warnings of the user executing on the server. This will show both active and total warnings.
Decaying all warnings regardless of the date::
* Usage: `decayAllWarnings [writeLog]`
* Description: This will cause all warnings of this server which are not decayed yet to be decayed instantly. If this command should log the decaying of the warnings

View File

@@ -2,6 +2,10 @@
This feature enables users to contact the moderation of the server in a private manner. This can be initiated by messaging the Abstracto bot.
Feature key: `modmail`
==== Necessary bot permissions
`MANAGE_CHANNEL` to create the channels representing the mod mail threads
==== Workflow
* User messages the Abstracto bot
@@ -12,8 +16,6 @@ This feature enables users to contact the moderation of the server in a private
* Moderators close the thread
* The interactions between the user and the moderators gets logged in the mod mail logging channel
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.
@@ -22,7 +24,7 @@ Feature key: `modmail`
`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
==== 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.

View File

@@ -88,6 +88,18 @@ Retrieving the URL of an emote::
* Usage `showEmote <emote>`
* Description: Posts the name of the emote accompanied with the URL where the image of the emote is stored.
Displaying the avatar or a member::
* Usage: `showAvatar [member]`
* Description: Displays the avatar of the given member accompanied with a URL to access it directly. If no member is provided, the member executing will be used.
Displaying information about members::
* Usage: `userInfo [member]`
* Description: Displays information about a member including: username, ID, activity, nickname (if any), date joined the server and date registered on discord.
Displaying information about server::
* Usage: `serverInfo`
Description: Displays information about the server including: ID, server name, owner, member count, creation date, role count, server features and custom emotes of the server.
=== Link embeds
==== Emotes

View File

@@ -14,7 +14,7 @@ This documentation is split into two parts: Technical documentation and user doc
== Glossary
Post target:: Describes the channel where Abstracto will send specific messages to. For example, the command `ban` sends a message containing information about the ban to the `banLog` post target.
Post targets can be configured with the command `posttarget` and once defined can only be switched to another channel.
Post targets can be configured with the command `posttarget` and once defined can only be switched to another channel. The bot needs `MESSAGE_WRITE` in the channel in order to send the messages.
Decayed warnings:: Warnings have a decayed property, which means it can be marked as inactive, while the warning itself is not deleted.
== General information
@@ -30,7 +30,8 @@ In the respective features they are noted under `Relevant system configuration`.
In order to change this you need to use the command `setConfig` with the provided key and the new desired value.
Emotes:: The features have section of the keys of used emotes in the feature, you can change this emote with the `setEmote` command.
Feature Modes:: Features can have different modes. This means, a feature behaves differently if the mode is changed. For example: `modmail` has two modes: `log` and `noLog`.
In the mode `log` mod mail threads wil be logged into the post target `modmailLog` while in the other mode, this does not happen. This consideration of the modes does depend on the implementation of the features.
In the mode `log` mod mail threads will be logged into the post target `modmailLog` while in the `noLog` mode, this does not happen. This consideration of the modes does depend on the implementation of the features.
== Features
include::features/core.adoc[]