-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add select menu-based role management #20
Open
Fox-Islam
wants to merge
3
commits into
chris-mcdonald-dev:development
Choose a base branch
from
Fox-Islam:feature/emoji-role-management
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add select menu-based role management #20
Fox-Islam
wants to merge
3
commits into
chris-mcdonald-dev:development
from
Fox-Islam:feature/emoji-role-management
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fox-Islam
added
the
conflicts
This branch has conflicts with the base branch and must be updated before it can be merged
label
Jun 28, 2021
Not a huge issue, just annoying having it show up and clogging up the terminal Also fixed a bug where if the bot doesn't have access to a channel it would bubble up an error, made it avoid that case instead
Based off this discussion in #server-suggestions: https://discord.com/channels/782201995011817493/793224619012128779/819308969460891648 Which concerns adding channels hidden behind roles and a method through which to assign those roles This feature will allow any moderator to create a post (possibly in the welcome channel) which can be used to auto-assign roles based on which reactions a user clicks Example usage: Making a post like this: ``` !role message 📖: @ReadingRole - For people who want to view the reading channel ✍🏾: @WritingRole - For people who want to view the writing channel 👂: @ListeningRole - For people who want to view the listening channel ``` Would result in the bot auto-adding those 📖, ✍🏾 and 👂 reactions to the message. Any time a user clicks one of the reactions they are assigned to the corresponding role by the bot. They may also remove their reaction to be unnassigned from that role The usage rules currently: - The message must start with "!role message" - The reaction must be part of the standard set (no custom server emojis) - The sequence to form a role/reaction pair is: {Emoji}{colon}{Role mention} - Any line that contains the sequence is picked up and parsed - The line may include additional details after that sequence - Additional lines may be included that don't contain the sequence (these are ignored) - The message can be edited after creation to have none of these details and will still function as a role assignation message Tables added to the database: - RoleMessage - messageId - channelId - roleReactions (Array of objects:) - reactionName (emoji character code) - roleId (corresponding role for emoji) Dev dependencies added to package.json: - @babel/plugin-proposal-unicode-property-regex - Required to use Unicode property regexes - Allows us to use \p{Emoji} as a pattern to match any emoji New events added to index.js: - messageDelete - Fires whenever a message is deleted - Used to trigger the deletion of a role message from the database
Fox-Islam
force-pushed
the
feature/emoji-role-management
branch
from
July 14, 2021 14:38
8df80cb
to
f167d33
Compare
Fox-Islam
removed
the
conflicts
This branch has conflicts with the base branch and must be updated before it can be merged
label
Jul 14, 2021
Fox-Islam
changed the title
Add emoji-based role management
Add select menu-based role management
Jul 14, 2021
Fox-Islam
force-pushed
the
feature/emoji-role-management
branch
from
July 15, 2021 13:02
0416069
to
9373c8c
Compare
Based off this discussion in #server-suggestions: https://discord.com/channels/782201995011817493/793224619012128779/819308969460891648 Which concerns adding channels hidden behind roles and a method through which to assign those roles This feature will allow any moderator to create posts (possibly in the welcome channel) which can be used to auto-assign roles based on which options a user selects Example usage: Making a post like this: ``` !role message 📖: 57438598437 - For people who want to view the reading channel ✍🏾: 5439857439 - For people who want to view the writing channel 👂: 5483795438 - For people who want to view the listening channel ``` Would result in the bot creating a message with a select menu using the provided role ids, emojis and descriptions Any time a user selects an option they are assigned to the corresponding role by the bot Any deselected roles in the list will unnassign them from those roles The usage rules currently: - The message must start with "!role message" - The reaction must be part of the standard set (no custom server emojis) - The sequence to form a role/reaction pair is: {Emoji}{colon}{Role id} - Any line that contains the sequence is picked up and parsed - The line may include an optional description after that sequence which will be used in the select menu - Additional lines may be included that don't contain the sequence (these are not parsed) New events added to index.js: - clickMenu - Fires whenever a user closes the select menu with changes - Used to trigger role assignation
Fox-Islam
force-pushed
the
feature/emoji-role-management
branch
from
July 15, 2021 16:58
9373c8c
to
8b0ba03
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based off this discussion in #server-suggestions which concerns adding channels hidden behind roles and a method through which a person may self-assign those roles
This feature will allow any moderator to create posts (possibly in the welcome channel) which can be used to auto-assign roles based on which options a user selects
Example usage:
Making a post like this:
Would result in the bot creating a message with a select menu using the provided role ids, emojis and descriptions
Any time a user selects an option they are assigned to the corresponding role by the bot
Any deselected roles in the list will unnassign them from those roles
Interface
The usage rules currently:
{Emoji}{colon}{Role id}
Notable additions in this commit
Dev dependencies added to package.json:
discord-buttons
New events added to index.js:
"clickMenu"