mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-29 23:02:49 +00:00
[AB-302] refactoring assignable roles to use buttons instead of reactions
moved button related services to component service instead of message service adding component type to component payload renamed async role service methods ignoring bot reactions in starboard fixing rank not showing correct experience to next level for other members
This commit is contained in:
@@ -1,17 +1,9 @@
|
||||
=== Assignable roles
|
||||
|
||||
This feature enables creating and maintaining so-called 'assignable role places'. These places are messages at which reactions are added, and when a member reacts, a configured role, is assigned to the user.
|
||||
These places can consist of multiple messages (reactions are limited to 20 per message) and assignable roles can be added/removed. A place can be disabled, which causes any reaction to be removed and no role to be assigned.
|
||||
There are several configurations possible for each individual assignable role place.
|
||||
* `inline`: tries to display the embed as compact as possible and when this is disabled, every assignable role is displayed in a separate line. Default: `false`
|
||||
* `autoRemove`: if a member adds a reaction to the assignable role place, they are removed immediately afterwards. Default: `false`
|
||||
* `unique`: if a member adds a reaction and has previously selected other roles, these previous roles are removed before the new ones are assigned. Default: `false`
|
||||
* `active`: an inactive assignable role place does not assign any roles and immediately removes any reactions added. Default: `true`
|
||||
This feature enables creating and maintaining so-called 'assignable role places'. These places are messages at which buttons are added, and when a member clicks such a button, a configured role, is assigned to the user.
|
||||
A place can be disabled, which causes the buttons to become disabled. Such places can be made 'unique', which means that users can only have one role available in the place.
|
||||
|
||||
If there are reactions added by members, which are not used within an assignable role place, the reaction gets removed automatically.
|
||||
|
||||
If the emote is deleted, the assignable role place is still functional, but if you set it up again, it fails to do so. You need to remove the emote from the assignable role place via its ID. The ID will be displayed for the emotes which were removed.
|
||||
Deleting the actual role behind an assignable role causes the assignable role place to become non-functional: the added reaction will remain and reactions can still be added, but nothing will happen.
|
||||
Deleting the actual role behind an assignable role causes the assignable role place to become non-functional: the button will remain and can still be clicked, but users will receive and error message.
|
||||
|
||||
Feature key: `assignableRole`
|
||||
|
||||
@@ -23,55 +15,50 @@ Create a new assignable role place::
|
||||
When the place is setup, it will be posted in the `channel`. The created place is active and inline by default.
|
||||
|
||||
Add a role to an assignable role place::
|
||||
* Usage: `addRoleToAssignableRolePlace <name> <emote> <text> <role>`
|
||||
* Description: Adds to the assignable role place identified by `name` an additional assignable role. The reaction to be used will be `emote` and `role` will be assigned when a member adds the reaction.
|
||||
It is required that `emote` is usable by Abstracto and not yet used in the assignable role place. If the assignable role place is currently setup, the assignable role will be directly appended to the assignable role place and is
|
||||
immediately available to be used. If this requires a new post, because the last message already has the maximum amount of reactions, it is required to setup the assignable role place again.
|
||||
* Usage: `addRoleToAssignableRolePlace <name> <role> <text> [emote]`
|
||||
* Description: Adds to the assignable role place identified by `name` an additional assignable role. The `role` will be assigned when a member adds the reaction. The `text` will be the text of the button, and the optional `emote` will be used in the button.
|
||||
It is required that `emote` is usable by Abstracto.
|
||||
|
||||
Create the assignable role place in discord::
|
||||
* Usage: `setupAssignableRolePlace <name>`
|
||||
* Description: Posts the messages of the assignable role place identified by `name` to the configured channel in discord and adds the reactions. This will delete the old messages connected to this assignable role place, if there are any.
|
||||
* Description: Posts the message of the assignable role place identified by `name` to the configured channel in discord. This will delete the old message connected to this assignable role place, if there is any.
|
||||
|
||||
Remove a role from an assignable role place::
|
||||
* Usage: `removeRoleFromAssignableRolePlace <name> <emote>`
|
||||
* Description: Removes from the assignable role place identified by `name`, the emote identified by `emote`. If the assignable role place is currently in use, this will update the message and remove all reactions using `emote`.
|
||||
* Usage: `removeRoleFromAssignableRolePlace <name> <role>`
|
||||
* Description: Removes from the assignable role place identified by `name`, the button associated with the role `role`. If the role was deleted in the meantime, providing the role ID works as well.
|
||||
|
||||
Show the current configuration for an assignable role place::
|
||||
* Usage: `showAssignableRolePlaceConfig <name>`
|
||||
* Description: This command displays the current configuration of assignable role place identified by `name`. This information includes the available emotes, which roles they represent and what position they have.
|
||||
|
||||
Test how the assignable role place would look like::
|
||||
* Usage: `testAssignableRolePlace <name>`
|
||||
* Description: Posts the assignable role place identified by `name` in the current channel. This command does not add the reactions, and is purely to check how the messages look.
|
||||
* Description: This command displays the current configuration of assignable role place identified by `name`.
|
||||
|
||||
Move an assignable role place to another channel::
|
||||
* Usage: `moveAssignableRolePlace <name> <newChannel>`
|
||||
* Description: Moves the assignable role place identified by `name` to be in `newChannel`. This change takes effect the next time the assignable role place is setup via `setupAssignableRolePlace`.
|
||||
* Description: Moves the assignable role place identified by `name` to be in `newChannel`. If the place is currently shown, this will immediately delete the message and create the place in the given `newChannel`.
|
||||
|
||||
Deactivate the assignable role place::
|
||||
* Usage: `deactivateAssignableRolePlace <name>`
|
||||
* Description: Deactivates the assignable role place identified by `name`. Any further reactions placed by members will be removed immediately and not assign any roles.
|
||||
* Description: Deactivates the buttons of the assignable role place identified by `name`.
|
||||
|
||||
Activate the assignable role place::
|
||||
* Usage: `activateAssignableRolePlace <name>`
|
||||
* Description: Activates the assignable role place identified by `name` and enables the assignment of roles.
|
||||
* Description: Activates the buttons of the assignable role place identified by `name` and enables the assignment of roles.
|
||||
|
||||
Change configuration of assignable role place::
|
||||
* Usage: `changeAssignableRolePlaceConfig <name> <key> <newValue>`
|
||||
* Description: Changes the config attribute indicated by `key` of the place identified by `name` to `newValue`. The possible keys are: `inline`, `unique`, `autoRemove` and `active` respectively and all of these can take `true`/`false` as `newValue`.
|
||||
|
||||
Swap two emotes in an assignable role place::
|
||||
* Usage: `swapAssignableRolePosition <name> <firstEmote> <secondEmote>`
|
||||
* Description: Swaps the position of the assignable role places `firstEmote` and `secondEmote` in the assignable role place identified by `name`. This change takes effect the next time the assignable role place is setup via `setupAssignableRolePlace`.
|
||||
|
||||
Set the position of an assignable role within an assignable role place::
|
||||
* Usage: `setAssignableRolePosition <name> <emote> <position>`
|
||||
* Description: Sets the position of the `emote` within the assignable role place identified by `name` to `position`. This change takes effect the next time the assignable role place is setup via `setupAssignableRolePlace`.
|
||||
* Description: Changes the config attribute indicated by `key` of the place identified by `name` to `newValue`. The possible key is `unique` and it can take `true`/`false` as `newValue`.
|
||||
|
||||
Delete an assignable role place::
|
||||
* Usage: `deleteAssignableRolePlace <name>`
|
||||
* Description: Completely deletes the assignable role place identified by `name`. This includes any trace in the database and the current messages, if any.
|
||||
* Description: Completely deletes the assignable role place identified by `name`. This includes any trace in the database and the current message, if any.
|
||||
|
||||
Change description text of assignable role place::
|
||||
* Usage `editAssignableRolePlaceText <name> <newText>`
|
||||
* Description: Changes the text which is shown in the first message of the assignable role place identified by `name` to `newText`. This changes the message immediately.
|
||||
* Description: Changes the text which is shown in the message of the assignable role place identified by `name` to `newText`. This changes the message immediately.
|
||||
|
||||
Create an assignable role condition::
|
||||
* Usage: `addAssignableRoleCondition <name> <role> <conditionKey> <conditionValue>`
|
||||
* Description: Creates a condition for the given assignable role identified by `role` for the assignable role place identified by `name`. There only exist one `conditionKey` right now, which is `min_level`. The given `conditionValue` for this condition must be a number between 1 and 150.
|
||||
|
||||
Delete an assignable role condition::
|
||||
* Usage: `removeAssignableRoleCondition <name> <role> <conditionKey>`
|
||||
* Description: Removes the assignable role condition `conditionKey` for `role` in the assignable role place identified by `name`. There only exist one `conditionKey` right now, which is `min_level`.
|
||||
Reference in New Issue
Block a user