[AB-196] adding confirmation requirement to various commands

refactoring command received handler in order to re-use when confirmation has been given
removing reaction from showSuggestion and remind command
adding log message for message deleted message, in case the member left
all commands from now on must work without the member field from the message, as this is not available when retrieving the message
This commit is contained in:
Sheldan
2021-09-10 21:40:54 +02:00
parent da1a71ecdc
commit 16e6caa1f0
51 changed files with 615 additions and 109 deletions

View File

@@ -51,7 +51,7 @@ Change configuration of ARP::
Delete an ARP::
* Usage: `deleteAssignableRolePlace <name>`
* Description: Completely deletes the ARP identified by `name`. This includes any trace in the database and the current message, if any.
* Description: Completely deletes the ARP identified by `name`. This includes any trace in the database and the current message, if any. Requires you to confirm the command.
Change description text of ARP::
* Usage `editAssignableRolePlaceText <name> <newText>`

View File

@@ -2,6 +2,13 @@
The core feature contains necessary commands in order for Abstracto to function and be configured.
==== Relevant system configuration
`noCommandFoundReporting` Whether not found commands should be reported back to the user. Default: true.
`maxMessages` The upper limit of messages created by the template mechanism. Default: 3.
`confirmationTimeout` The duration in seconds after which the confirmation is deleted. Default: 120.
==== Emotes
* `successReaction` reaction emote in case the command completed successfully
* `warnReaction` reaction emote in case the command did not complete successfully
@@ -152,7 +159,7 @@ Create a server specific alias::
* Description: Creates the server specific alias for command `commandName` identified by `alias`. This means that from now on, users can use the command identified by `commandName` by using `alias` in its place, when executing the command or when using the help command. This alias is only available in this server, and it is not allowed to use the names of existing commands or built-in aliases.
Delete a server specific alias::
* Usage: `deleteAlias <alias>`
* Description: Deletes the server specific alias identified by `alias`. It is not possible to delete built-in aliases.
* 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>`
* Description: Creates a profanity group with the given `profanityGroupName`. This name must be unique within the server.

View File

@@ -31,18 +31,18 @@ Setting a role to be awarded at a certain level::
* Usage: `setExpRole <level> <role>`
* Description: Sets `role` to be awarded at the given `level`. If the role was previously assigned,
this will cause to remove this assignment and recalculate the roles for all users previously having this role.
A status image indicating the progress will be shown. It will not award this role to users which qualify for this, a `syncRoles` is necessary for this.
A status image indicating the progress will be shown. It will not award this role to users which qualify for this, a `syncRoles` is necessary for this. Requires you to confirm the command.
* Example: `setExpRole 50 @HighLevel` in order to award the role `HighLevel` at level `50` (the @HighLevel is a role mention)
Syncing the roles of the members with the configuration::
* Usage: `syncRoles`
* Description: Recalculates the appropriate levels for all users on the server and awards the roles appropriate for the level.
There will be a message indicating the current status of the progress, and it is highly advised to not execute this command while another instance is still processing.
There will be a message indicating the current status of the progress, and it is highly advised to not execute this command while another instance is still processing. Requires you to confirm the command.
This command can run for a longer period of time, depending on the amount of members in the guild.
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.
* 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. Requires you to confirm the command.
This will provide a status update message displaying the process.
Disable experience gain for a certain role::

View File

@@ -67,7 +67,7 @@ Showing your 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`
* Description: This will cause all warnings of this server which are not decayed yet to be decayed instantly.
* Description: This will cause all warnings of this server which are not decayed yet to be decayed instantly. Requires you to confirm the command.
Deleting a warning::
* Usage: `deleteWarning <warnId>`
* Description: Deletes the warning identified by `warnId` completely from the database.
@@ -91,7 +91,7 @@ Feature key: `warnDecay`
==== Commands
Decaying all warnings if necessary::
* Usage: `decayWarnings`
* Description: Triggers the decay of the warnings instantly, which means, every not decayed warning on this server older than the configured amount of days will be decayed and the decay will be logged.
* Description: Triggers the decay of the warnings instantly, which means, every not decayed warning on this server older than the configured amount of days will be decayed and the decay will be logged. Requires you to confirm the command.
=== Muting
@@ -193,7 +193,7 @@ Showing the tracked filtered invites::
Remove all or individual invites from the tracked filtered invites::
* Usage: `removeTrackedInviteLinks [invite]`
* Description: Removes the stored statistic for the given `invite`. In case `invite` is not given, it will delete all tracked filtered invites from the server.
* Description: Removes the stored statistic for the given `invite`. In case `invite` is not given, it will delete all tracked filtered invites from the server. Requires you to confirm the command.
* Mode Restriction: This command is only available when the feature mode `trackUses` is enabled.
=== Profanity filter

View File

@@ -43,13 +43,13 @@ Synchronize the server emotes with the database::
A message containing the amount of emotes deleted and created is shown. If the feature mode `emoteAutoTrack` is enabled, this should only be necessary in case the bot had an outage.
Delete emote usages::
* Usage: `purgeEmoteStats <emote> [period]`
* Description: This command removes any stored usages of `emote`. The `emote` can either be a valid usage or the ID of an emote. If `period` is given, only usages within this time period will be deleted, if it is not provided, the complete timeline will be deleted.
* Description: This command removes any stored usages of `emote`. The `emote` can either be a valid usage or the ID of an emote. If `period` is given, only usages within this time period will be deleted, if it is not provided, the complete timeline will be deleted. Requires you to confirm the command.
Deleting an individual tracked emote::
* Usage: `deleteTrackedEmote <emote>`
* Description: Deletes the tracked emote from the database including the usages. The `emote` can either be a valid usage or the ID of an emote.
* Description: Deletes the tracked emote from the database including the usages. The `emote` can either be a valid usage or the ID of an emote. Requires you to confirm the command.
Reset emote statistics::
* Usage: `resetEmoteStats`
* Description: This will delete all emote usages and tracked emotes in the database.
* Description: This will delete all emote usages and tracked emotes in the database. Requires you to confirm the command.
Show the image of external tracked emotes::
* Usage: `showExternalTrackedEmote <emote>`
* Description: Shows the ID, name, link to the image and the image directly for `emote` in an embed.

View File

@@ -164,11 +164,11 @@ Feature key: `repostDetection`
==== Commands
Remove stored image posts and reposts of whole server or specific member::
* Usage: `purgeImagePosts [member]`
* Description: If `member` is provided, this will delete all stored image hashes (and their reposts) from the database. If `member` is not provided, this will delete all stored image hashes (and their reposts) from the whole server.
* Description: If `member` is provided, this will delete all stored image hashes (and their reposts) from the database. If `member` is not provided, this will delete all stored image hashes (and their reposts) from the whole server. Requires you to confirm the command.
Remove reposts of whole server or specific member::
* Usage: `purgeReposts [member]`
* Description: If `member` is provided, this will delete all reposts of the given member. If `member` is not provided, this will delete all reposts in the whole server.
* Description: If `member` is provided, this will delete all reposts of the given member. If `member` is not provided, this will delete all reposts in the whole server. Requires you to confirm the command.
Show the leaderboard of reposts::
* Usage: `repostLeaderboard [page]`