-
-
Notifications
You must be signed in to change notification settings - Fork 732
Allow members to self assign roles through a persistent view #2341
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
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
3686f60
add the roles channel to the config
shtlrs 5795140
add the AllSelfAssignableRolesView and its corresponding ClaimAllSelf…
shtlrs 6ab9f9c
add the logic for attaching the persistent view
shtlrs b25ad80
add assignable_roles as a property to the ClaimAllSelfAssignableRoles…
shtlrs 1d60403
add implementation of the button's callback that'll handle assigning …
shtlrs af58814
rely on original_message to delete view once it times out
shtlrs 3cedc99
restore original value of DELETE_MESSAGE_AFTER
shtlrs 6c61d34
rename ClaimAllSelfAssignableRolesButton to ShowAllSelfAssignableRole…
shtlrs bde96fd
update message content of the persistent view
shtlrs dd4903c
fix docstrings of the ShowAllSelfAssignableRolesButton's callback fun…
shtlrs bd4b0b4
rename prepare_available_role_subscription_view to prepare_self_assig…
shtlrs 54dfcf9
update docs for the newly added view & button
shtlrs 28c733c
rename the method that attaches the persistent view
shtlrs c628722
remove waring in setup docstrings
shtlrs f748ceb
misc style & doc improvements
shtlrs c14e75a
add docstrings to RoleButtonView
shtlrs e7d0987
make the roles view ephemeral when sent in roles channel
shtlrs d8850b4
Merge branch 'main' into 2332-permanent-role-view
shtlrs 0a60b5d
do not use name mangling
shtlrs 28dac62
call super without referencing the current class
shtlrs 72b2f80
rename #Roles section to #Information
shtlrs 24c36e5
use button decorator instead of subclassing discord.ui.Button
shtlrs a6fa4b1
update custom id of the AllSelfAssignableRolesView's button
shtlrs c630e1b
make SELF_ASSIGNABLE_ROLES_MESSAGE more inviting for people to intera…
shtlrs 37b43a6
ditch prepare_self_assignable_roles_view by constructing the buttons …
shtlrs 6c6b2bc
relay the newly created view to __attach_persistent_roles_view
shtlrs 7118c51
edit view through interaction.response.edit_message
shtlrs 7976bc2
use follow.send to send the role update message
shtlrs 91a869e
do not use name mangling in _attach_persistent_roles_view
shtlrs c55b9ff
fix Zig's nit comments
shtlrs 52d69de
fix typos in the SELF_ASSIGNABLE_ROLES_MESSAGE
shtlrs 8af86ae
Merge branch 'main' into 2332-permanent-role-view
mbaruh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we are returning
Nonefor thediscord.ui.View? Couldn't we just usediscord.ui.View.from_message?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't really recreate the view using
from_message, as this persistent view needs to be instantiated with the self assignable roles, andfrom_messagecannot pick that up.