[AB-xxx] adding/updating documentation for core and experience module

updating asciidoctor plugin version
adding check to not allow duplicate level action configurations
limiting experience level up notification toggle command to be only available if the feature mode is enabled
This commit is contained in:
Sheldan
2024-04-18 23:09:56 +02:00
parent dfe9792330
commit 43c5d041ef
8 changed files with 175 additions and 42 deletions

View File

@@ -18,6 +18,7 @@ import dev.sheldan.abstracto.core.service.management.UserInServerManagementServi
import dev.sheldan.abstracto.experience.config.ExperienceFeatureDefinition;
import dev.sheldan.abstracto.experience.config.ExperienceFeatureMode;
import dev.sheldan.abstracto.experience.config.ExperienceSlashCommandNames;
import dev.sheldan.abstracto.experience.exception.LevelActionAlreadyExistsException;
import dev.sheldan.abstracto.experience.exception.LevelActionNotFoundException;
import dev.sheldan.abstracto.experience.listener.LevelActionListener;
import dev.sheldan.abstracto.experience.model.LevelActionPayload;
@@ -99,6 +100,9 @@ public class AddLevelAction extends AbstractConditionableCommand {
return userExperienceManagementService.saveUser(user);
});
}
if(levelActionManagementService.getLevelAction(actionName, level, server, userExperience).isPresent()) {
throw new LevelActionAlreadyExistsException();
}
levelActionManagementService.createLevelAction(level, server, actionName, userExperience, payload);
return interactionService.replyEmbed(RESPONSE_TEMPLATE, event)
.thenApply(interactionHook -> CommandResult.fromSuccess());

View File

@@ -7,12 +7,14 @@ import dev.sheldan.abstracto.core.command.config.Parameter;
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.config.FeatureMode;
import dev.sheldan.abstracto.core.interaction.InteractionService;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig;
import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService;
import dev.sheldan.abstracto.core.models.database.AUserInAServer;
import dev.sheldan.abstracto.core.service.management.UserInServerManagementService;
import dev.sheldan.abstracto.experience.config.ExperienceFeatureDefinition;
import dev.sheldan.abstracto.experience.config.ExperienceFeatureMode;
import dev.sheldan.abstracto.experience.config.ExperienceSlashCommandNames;
import dev.sheldan.abstracto.experience.service.AUserExperienceService;
import net.dv8tion.jda.api.entities.Member;
@@ -100,4 +102,10 @@ public class ExpLevelUpNotification extends AbstractConditionableCommand {
.help(helpInfo)
.build();
}
@Override
public List<FeatureMode> getFeatureModeLimitations() {
return Arrays.asList(ExperienceFeatureMode.LEVEL_UP_NOTIFICATION);
}
}

View File

@@ -0,0 +1,21 @@
package dev.sheldan.abstracto.experience.exception;
import dev.sheldan.abstracto.core.exception.AbstractoRunTimeException;
import dev.sheldan.abstracto.core.templating.Templatable;
public class LevelActionAlreadyExistsException extends AbstractoRunTimeException implements Templatable {
public LevelActionAlreadyExistsException() {
super("Level action already exists.");
}
@Override
public String getTemplateName() {
return "level_action_already_exists_exception";
}
@Override
public Object getTemplateModel() {
return new Object();
}
}

View File

@@ -116,7 +116,7 @@ public class Infractions extends AbstractConditionableCommand {
} else if(slashCommandParameterService.hasCommandOptionWithFullType(USER_PARAMETER, event, OptionType.STRING)){
String userIdStr = slashCommandParameterService.getCommandOption(USER_PARAMETER, event, User.class, String.class);
Long userId = Long.parseLong(userIdStr);
AUserInAServer userInServer = userInServerManagementService.createUserInServer(event.getGuild().getIdLong(), userId);
AUserInAServer userInServer = userInServerManagementService.loadOrCreateUser(event.getGuild().getIdLong(), userId);
infractions = infractionManagementService.getInfractionsForUser(userInServer);
} else {

View File

@@ -74,8 +74,12 @@
<configuration>
<outputFile>index.html</outputFile>
<sourceDirectory>src/main/docs/asciidoc</sourceDirectory>
<backend>html</backend>
<backend>html5</backend>
<doctype>book</doctype>
<attributes>
<toc>left</toc>
<icons>font</icons>
</attributes>
</configuration>
</execution>
</executions>

View File

@@ -20,84 +20,114 @@ Help::
This information includes a description and the executable commands of this module. If the provided parameter matches a command name, information about this command is displayed.
The module matching takes precedence over command matching.
This information includes a short description, a more detailed description, aliases (if any), parameters (if any), which roles are allowed to execute the command,
and which effects a command has
and which effects a command has.
Changing the system configuration::
* Usage `setConfig <key> <value>`
* Slash command: `config set`
* Description: Changes the value of this configuration identified by `key` to `value`. Some of these configurations have separate specific commands, but this works in general.
* Example: `setConfig expMin 15` to set the minimum experience to 15
Resetting the configuration to default values::
* Usage `resetConfig [key/feature]`
* Slash command: `config reset`
* Description: Resets the configuration of the given `key` or for the complete feature identified by `feature`. If this is not provided, it will reset the entire server to the default configuration.
Changing emotes the bot uses::
* Usage: `setEmote <key> <emote>`
* Slash command: `config setemote`
* Description: Sets the emote identified by `key` used by the bot on this server to `emote`.
This allows both built in emotes and custom emotes, but the bot must be in the server of the custom emote in order to use them.
Clearing the cache::
* Usage: `clearCache`
* Description: Clears the internal cache used by the bot. This is mostly useful to update tempaltes when they were changed in the database.
* Slash command: `interal clearcache`
* Description: Clears the internal cache used by the bot. This is mostly useful to update templates when they were changed in the database.
Ping::
* Usage: `ping`
* Slash command: `ping`
* Description: Prints the gateway ping of the bot to the Discord servers.
Echo::
* Usage: `echo <text>`
* Description: Echos `text` in the same channel this command as executed in.
* Usage: `echo <text> [targetChannel]`
* Slash command: `echo`
* Description: Echos `text` in the same channel this command as executed in. The slash command offers the ability to provide a `targetChannel`.
Changing the prefix::
* Usage: `setPrefix <prefix>`
* Description: Changes the prefix of the bot in this guild to `prefix`. This can be one or multiple characters.
Changing a post target::
* Usage: `posttarget <key> <channel>`
* Description: Changes the given post target identified by `key` to `channel`. All messages using this post target will be sent to this channel from now on.
If neither `key` nor `channel` is given, this will print the currently available post targets and the channels they point to, if set.
* Usage: `posttarget <name> <channel>`
* Slash command: `posttarget posttarget`
* Description: Changes the given post target identified by `name` to `channel`. All messages using this post target will be sent to this channel from now on.
If neither `name` nor `channel` is given, this will print the currently available post targets and the channels they point to, if set.
* Example: `posttarget banLog #general` to log the bans in the #general channel.
Disabling a post target::
* Usage: `disablePostTarget <key>`
* Slash command: `posttarget diable`
* Description: Disables the post target identified by `key` to not send any messages towards. Some features require a post target to be enabled, and have the option to throw an exception, others might just ignore it.
Enabling a post target::
* Usage: `enablePostTarget <key>`
* Slash command: `posttarget enable`
* Description: Enables the post target identified by `key` to not send any messages towards.
Changing admin mode::
* Usage: `setAdminMode <true/false>`
* Description: Changes the admin modes on this server to the given value. Admin mode means, that **all** commands in the current server, can only be executed by members who have the ADMINISTRATOR permission.
Listing the features::
* Usage: `features`
* Slash command: `feature list`
* Description: Lists the available features and whether they are enabled in this server.
Enabling a feature::
* Usage: `enableFeature <key>`
* Slash command: `feature enable`
* Description: Enables the feature identified by `key` in this server. If the feature dependents on other features, they will be enabled as well. Any configuration which requires setup will be listed. In order to start a configuration wizard execute the command `setupFeature`.
* Example: `enableFeature moderation` to enable the moderation feature
Setting up a feature with an interactive wizard::
* Usage: `setupFeature <featureName>`
* Description: Starts an interactive wizard to configure the necessary configuration of a feature. Closes with a summary page to see all changes.
Disabling a feature::
* Usage: `disableFeature <key>`
* Slash command: `feature disable`
* Description: Disables the feature identified by `key` in this server. If the feature is required for other features, they will be disabled as well.
* Example: `disableFeature moderation` to disable the moderation feature
Enabling a feature mode::
* Usage: `enableMode <featureName> <mode>`
* Slash command: `feature enablemode`
* Description: Enables the mode `mode` in feature `featureName`. If the mode followed default configuration previously, it will not anymore after executing this command.
Disabling a feature mode::
* Usage: `disableMode <featureName> <mode>`
* Slash command: `feature disablemode`
* Description: Disables the mode `mode` in feature `featureName`. If the mode followed default configuration previously, it will not anymore after executing this command.
Listing all feature modes::
* Usage `featureModes [feature]`
* Slash command: `feature featuremodes`
* Description: Lists all 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 it is enabled and if this value comes from the default configuration.
Creating a channel group::
* Usage: `createChannelGroup <key>`
* Slash command: `channels createchannelgroup`
* Description: Creates a new channel group identified by `key`. There are different types of channel groups, depending on the features available. Per default `command` and `commandCoolDown` are available.
* Aliases: `+ChGroup`
Disabling a channel group::
* Usage: `disableChannelGroup <channelGroupName>`
* Description: Disables the effect the channel group `channelGroupName` has.
Enabling a channel group::
* Usage: `enableChannelGroup <channelGroupName>`
* Description: Enables the effect the channel group `channelGroupName` has.
Adding a channel to a channel group::
* Usage: `addToChannelGroup <groupName> <channel>`
* Slash command: `channels addtochannelgroup`
* 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`
Removing a channel from a channel group::
* Usage: `removeFromChannelGroup <groupName> <channel>`
* Slash command: `channels removefromchannelgroup`
* Description: Removes the `channel` from the channel group identified by `groupName`.
* Aliases: `rmChChgrp`, `chGrpCh-`
* Example: `removeFromChannelGroup group1 #general` to remove the channel #general from the group `group1`
Deleting a channel group::
* Usage: `deleteChannelGroup <key>`
* Slash command: `channels deletechannelgroup`
* 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. This requires the command to be added to this channel group first.
* Example: `disableCommand warn group1` to disable the command `warn` in the group `group1`
Enabling a command in a group::
* 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::
* Usage: `listChannelGroups`
* Slash command: `channels listchannelgroups`
* Description: Provides an overview of the currently available channel groups, which channels are in the group, whether the group has been disabled and the type of the channel group.
* Aliases: `lsChGrp`
Allowing a role to execute a command::
@@ -116,27 +146,18 @@ Removing role restrictions from a command::
* Description: Allows everyone to execute all commands in this `feature`/the `command`. Which means, any restrictions concerning which role is able to execute a certain command is ignored even if it still configured.
Make a role affected by a command::
* Usage: `makeAffected <effect> <role>`
* Slash command: `config makeaffected`
* Description: Makes the `role` affected by the `effect`.
* Example: `makeAffected ban @Staff` in order to the role `Staff` can be banned (where @Staff is a role mention)
Make a role immune against a command::
* Usage: `makeImmune <effect> <role>`
* Slash command: `config makeimmune`
* Description: Makes the `role` immune to `effect`.
* Example: `makeImmune ban @Staff` in order to the role `Staff` cannot be banned (where @Staff is a role mention)
Show all effects::
* Usage: `showEffects`
* Slash command: `config showeffects`
* Description: Shows the currently possible effects and a short description of them.
Enabling a feature mode::
* Usage: `enableMode <featureName> <mode>`
* Description: Enables the mode `mode` in feature `featureName`. If the mode followed default configuration previously, it will not anymore after executing this command.
Disabling a feature mode::
* Usage: `disableMode <featureName> <mode>`
* Description: Disables the mode `mode` in feature `featureName`. If the mode followed default configuration previously, it will not anymore after executing this command.
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 it is enabled and if this value comes from the default configuration.
Setting up a feature with an interactive wizard::
* Usage: `setupFeature <featureName>`
* Description: Starts an interactive wizard to configure the necessary configuration of a feature. Closes with a summary page to see all changes.
Allow the bot to use certain mentions::
* Usage: `allowMention <mentionType>`
* Description: Allows the bot to use certain mentions. ´mentionType` can either be `everyone`, `role` or `user`. If @everyone is enabled, this also enables @here mentions.
@@ -147,18 +168,23 @@ Disallow the bot to use certain mentions::
This change takes immediate effect and is only for the current server. Per default everyone/here mentions are disabled. This configuration can be overwritten on a template base.
Setting a custom template for this server::
* Usage: `setTemplate <templateKey>`
* Slash command: `internal settemplate`
* Description: Adds or updates the given template identified by `templateKey` only for the current server. The content of the template needs to be attached to the message as a file and is required to be a plaintext file. The file can be named anything. The template needs to be in https://freemarker.apache.org/[Freemarker] format. This change is only in effect for this server and is called a 'customized template'. This will take effect immediately.
Retrieving the current default template::
* Usage: `getTemplate <templateKey>`
* Description: Loads the current global template identified by `templateKey` and returns the content as an attached file..
* Slash command: `internal gettemplate`
* Description: Loads the current global template identified by `templateKey` and returns the content as an attached file.
Retrieving the current customized template for this server::
* Usage: `getCustomTemplate <templateKey>`
* Slash command: `internal getcustomtemplate`
* Description: Loads the current customized template identified by `templateKey` and returns the content as an attached file.
Resetting a customized template to the default template::
* Usage `resetTemplate <templateKey>`
* Slash command: `internal resettemplate`
* Description: Resets the template identified by `templateKey` to the default content.
Show a link to documentation::
* Usage `documentation`
* Slash command: `info documentation`
* Description: Shows links to access the documentation.
Create a server specific alias::
* Usage `createAlias <commandName> <alias>`
@@ -168,31 +194,39 @@ Delete a server specific alias::
* Description: Deletes the server specific alias identified by `alias`. It is not possible to delete built-in aliases. Requires you to confirm the command.
Creating a profanity group::
* Usage: `createProfanityGroup <profanityGroupName>`
* Slash command: `profanity createprofanitygroup`
* 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]`
* Slash command: `profanity addprofanityregex`
* Description: Adds a profanity regex `profanityName` to the profanity group `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 can be replaced. The `profanityName` must be unique within the profanity group.
Show the current profanity configuration::
* Usage: `showProfanityConfig`
* Slash command: `profanity 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>`
* Slash command: `profanity removeprofanityregex`
* Description: Removes the profanity regex `profanityName` from the profanity group `profanityGroupName`.
Deleting a profanity group::
* Usage: `deleteProfanityGroup <profanityGroupName>`
* Slash command: `profanity deleteprofanitygroup`
* Description: Deletes the profanity group identified by `profanityGroupName` and all profanity regexes within.
Showing the uptime of the bot::
* Usage: `uptime`
* Slash command: `uptime`
* Shows the uptime and start time of the bot instance.
Adding a command to a channel group::
* Usage: `addCommandToChannelGroup <channelGroupName> <commandName>`
* Description: Adds the command `commandName` to the channel group `channelGroupName`. This can be used in various channel group types to customize how these commands behave in the respective channels. For example per default there are channel group types to define whether a command is disabled or the cooldown thereof.
Disabling a channel group::
* Usage: `disableChannelGroup <channelGroupName>`
* Description: Disables the effect the channel group `channelGroupName` has.
Enabling a channel group::
* Usage: `enableChannelGroup <channelGroupName>`
* Description: Enables the effect the channel group `channelGroupName` has.
Disabling a command in a channel 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. This requires the command to be added to this channel group first.
* Example: `disableCommand warn group1` to disable the command `warn` in the group `group1`
Enabling a command in a channel group::
* 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`
Removing a command from a channel group::
* Usage: `removeCommandFromChannelGroup <channelGroupName> <commandName>`
* Description: Removes the command `commandName` from the channel group `channelGroupName`.
@@ -205,6 +239,17 @@ Setting channel and member cooldowns in a channel group::
Setting the global cooldown for a command::
* Usage: `commandCoolDownServer <command> <duration>`
* Description: Sets the cooldown for command `command` to `duration` for the whole server.
Setting the cooldown which is applied to every member in a server for a specific command::
* Usage: `setCommandMemberCooldown <command> <duration>`
* Slash command: `cooldown commandmember set`
* Description: This causes the command to only be executable every `<duration>` by each specific member. This means, that member B can execute the command after member A, but is restricted after doing so.
Removing the cooldown which is applied to every member in a server for a specific command::
* Usage: `removeCommandMemberCooldown <commandName>`
* Slash command: `cooldown commandmember remove`
* Description: This removes the cooldown which is applied for every member, if that member executes a command.
.What is a channel group?
A channel group is a grouping of channels, for easier management. These channel groups can have different types (see `listChannelGroups`). The currently available groups are: `command`, `commandCoolDown` and `experienceGain`. A command channel group is used to disable/enable certain commands for multiple channels at once. For example, you want a command to be disabled in a certain type of channel, you can add all of those commands to the channel group (see `addCommandToChannelGroup`) and then disable the command in that channel group. If you then want to treat a different channel similarly, you just have to add the channel to the group, and all those commands are disabled automatically. `experienceGain` is for disabling/enabling experience and `commandCoolDown` is for configuring the cooldowns of commands.
.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.

View File

@@ -2,7 +2,7 @@
This feature contains the ability to track experience of users on the server and award roles based on the level they reach.
The experience is awarded once per minute and is calculated by asciimath:[`\text{rand}(\text{minExp}, \text{maxExp}) * \text{expScale}`].
Currently members only have their highest earned role assigned.
Currently, members only have their highest earned role assigned.
==== Necessary bot permissions
`MANAGE_ROLES` in order to award members with roles
@@ -14,17 +14,35 @@ Currently members only have their highest earned role assigned.
`expScale` The multiplier applied after the experience amount was determined. Default: 1.0.
`expCooldownSeconds`: The seconds between members gaining experience. Default: 60
==== Feature modes
`levelUpNotification`:: if enabled, users receive a notification when they level up. The notification can be toggled by each user individually. Disabled by default.
`levelAction`:: if enabled, enables you to perform various actions when members reach/are above levels. Disabled by default.
==== Top level slash commands:
* `experience`: These are the publicly available commands for users to check general information, and rankings
* `experienceconfig`: Configuration slash commands
==== Commands
Changing the experience scale of the server::
* Usage: `expScale <value>`
* Slash command: `experienceconfig expscale`
* Description: Changes the value of `expScale` on this server to `value`.
Showing the current rank of a user::
* Usage: `rank [member]`
* Slash command: `experience rank`
* Description: Shows the experience amount, level, message count, experience until next level, server rank and level progress of the executing user, or the user provided as a parameter.
Showing the leaderboard of the server::
* Usage: `leaderboard [page]`
* Slash command: `experience leaderboard`
* Description: Shows the leaderboard of the server in a paginated format.
If no parameter is provided, it will show message count, level, experience and rank of the top 10 members.
Additionally, the same information for the executing user is shown, regardless whether or not the user is already shown on the given leader board page.
If a `page` is provided, it will display the leaderboard of the ranks `page * 10` until `(page + 1) * 10` instead. If `page` is beyond the member count, the last members are shown.
Additionally, the same information for the executing user is shown, regardless whether the user is already shown on the given leader board page.
If a `page` is provided, it will display the leaderboard of the ranks `page * 10` until `(page + 1) * 10` instead. If `page` is beyond the member count, the last members are shown. This also contains a button with a link leading to the leaderboard of the server (if enabled).
Setting a role to be awarded at a certain level::
@@ -47,26 +65,59 @@ This will provide a status update message displaying the process.
Disable experience gain for a certain role::
* Usage: `disableExpForRole <role>`
* Slash command: `experienceconfig disableexpforrole`
* 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.
If a member has *any* role of the ones for which experience is disabled, the member will not gain experience. This command has a slash command
Enable experience gain for a certain role::
* Usage: `enableExpForRole <role>`
* Slash command: `experienceconfig enableexpforrole`
* Description: Enables experience gain for `role`.
List roles for which experience gain is disabled::
* Usage: `listDisabledExperienceRoles`
* Slash command: `experienceconfig listdisabledexperienceroles`
* Description: Lists the roles for which experience gain is disabled in this server.
* Aliases: `lsDisEpRoles`
Disable experience gain for a specific member::
* Usage: `disableExpGain <member>`
* Slash command: `exeprienceconfig disableexpgain`
* Description: Disables experience gain fpr `member`.
Enable experience gain for a specific member::
* Usage: `enableExpGain <member>`
* Slash command: `experienceconfig enableexpgain`
* Description: Enables experience gain for `member`.
Show the currently configured experience roles in the server::
* Usage: `levelRoles`
* Description: Shows the current configured experience roles, and the level they are awarded at.
* Slash command: `experience levelroles`
* Description: Shows the current configured experience roles, and the level they are awarded at.
Toggle the level up notification::
* Usage: `expLevelUpNotification <newValue>`
* Slash command: `experience explevelupnotification`
* Description: Toggles for the executing user, if they receive level up notifications. Only `true` really enables the notification, any other value disables the notification. This command requires the feature mode `levelUpNotification`.
Add a level action::
* Usage: `addLevelAction <action> <level> <parameter> [member]`
* Slash command: `experienceconfig levelAction add`
* Description: Adds an `action` to be executed at `level` with the given `parameter`. If a `member` is provided, the action is restricted to be executed for only this member. The parameters `action` uses auto complete to show the currently available actions. The combination of `action`, `level` and `member` (if provided), is considered unique. If such a combination already exists, an error is shown. Each action then requires a different `parameter` passed. The actions `add_member_to_channel_above_level` and `remove_member_from_channel_above_level` require a channel mention/name/id, and `add_role_above_level` and `remove_role_above_level` require a role mention/name/id.
Viewing the current configured level actions::
* Usage: `showLevelActions`
* Slash command: `levelAction show`
Removing a level action::
* Usage: `removeLevelAction <action> <level> [member]`
* Slash command: `experienceconfig levelAction remove`
* Description: Removes an action to be executed at a certain level. Such an action is identified by a combination of `action`, `level` and optionally `member`. If no identifiable combination is found, an error is shown.
==== Level actions
Level actions are custom actions, which are performed when: a member reaches a new level, a user with pre-existing experience re-joins the server. Currently these actions include: `add_member_to_channel_above_level`, `remove_member_from_channel_above_level`, `add_role_above_level` and `remove_role_above_level`. `add_member_to_channel_above_level` and `remove_member_from_channel_above_level` adds/removes the member to a configured channel once they reach the configured level. `add_role_above_level` and `remove_role_above_level` adds/removes a role from a member once they reach the configured level. All the actions which fit the current level of the user are evaluated sorted by the level they are configured for.
The actions are combined, and only the result at the end is then applied to the user. For example a rule at level 5 to add role "Test", would get nullified by a role at level 10 that removes the role "Test". The entire list of actions is evaluated for each level change, which has the effect that actions configured for a level lower than a user has only take effect once the user changes level next time.
Level actions can be an alternative way of have a completely separate list of roles awarded at varying levels, without impacting the main experience roles.

View File

@@ -56,7 +56,7 @@
<properties>
<maven.build.timestamp.format>yyyy/MM/dd HH:mm</maven.build.timestamp.format>
<jda.version>5.0.0-beta.21</jda.version>
<asciidoctor.maven.plugin.version>2.0.0-RC.1</asciidoctor.maven.plugin.version>
<asciidoctor.maven.plugin.version>2.2.6</asciidoctor.maven.plugin.version>
<asciidoctorj.pdf.version>1.5.3</asciidoctorj.pdf.version>
<asciidoctorj.version>2.3.0</asciidoctorj.version>
<jruby.version>9.2.11.1</jruby.version>