Skip to content

Subscribe with buttons#1868

Merged
ChrisLovering merged 15 commits into
mainfrom
subscribe-with-buttons
Dec 1, 2021
Merged

Subscribe with buttons#1868
ChrisLovering merged 15 commits into
mainfrom
subscribe-with-buttons

Conversation

@ChrisLovering
Copy link
Copy Markdown
Member

@ChrisLovering ChrisLovering commented Oct 12, 2021

Description

This PR updates the subscribe command to be interactive with discord buttons.

Running this command now gives the users a set of buttons to click to add or remove pre-determined announcement roles.
Adding or removing a role updates the button state to reflect the change and what would happen if the user clicks the button again.

Screenshot(s)

This is what the command looks like after I ran it with no roles, then added the PyWeek role to myself.
image

Comment thread bot/exts/info/subscribe.py
@Xithrius Xithrius added a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) a: frontend Related to output and formatting p: 3 - low Low Priority review: do not merge The PR can be reviewed but cannot be merged now s: WIP Work In Progress t: feature New feature or request labels Oct 12, 2021
@ChrisLovering ChrisLovering force-pushed the subscribe-with-buttons branch from cce4ba7 to 09071ad Compare October 12, 2021 22:14
@ChrisLovering ChrisLovering changed the base branch from main to discord-2.0 October 12, 2021 22:19
@ChrisLovering ChrisLovering force-pushed the subscribe-with-buttons branch from 09071ad to c36cb9d Compare October 12, 2021 22:30
Comment thread bot/constants.py Outdated
Comment thread bot/exts/help_channels/_cog.py
Comment thread bot/exts/info/subscribe.py
Comment thread bot/exts/info/subscribe.py Outdated
@onerandomusername
Copy link
Copy Markdown
Contributor

I have more changes, but github doesn't let you finish a review if the diff is changed while reviewing it...

Comment thread bot/exts/info/subscribe.py Outdated
@ChrisLovering ChrisLovering force-pushed the subscribe-with-buttons branch 2 times, most recently from 294a008 to 6aa2121 Compare October 12, 2021 22:38
@ChrisLovering ChrisLovering added s: needs review Author is waiting for someone to review and approve and removed s: WIP Work In Progress labels Oct 12, 2021
Comment thread bot/exts/info/subscribe.py
Comment thread bot/exts/moderation/verification.py
Comment thread bot/utils/members.py
Comment thread config-default.yml
@ChrisLovering ChrisLovering force-pushed the subscribe-with-buttons branch 3 times, most recently from 1aa2b12 to 70d055a Compare October 14, 2021 14:41
@ChrisLovering
Copy link
Copy Markdown
Member Author

Rebased onto d.py 2.0 branch again since there were changes

Base automatically changed from discord-2.0 to main October 17, 2021 08:16
@ChrisLovering ChrisLovering force-pushed the subscribe-with-buttons branch from 70d055a to 8b327b3 Compare October 17, 2021 08:32
@ChrisLovering ChrisLovering marked this pull request as ready for review October 17, 2021 08:32
@ChrisLovering
Copy link
Copy Markdown
Member Author

This has fixup commits, so please do not update this branch when it's approved.

Doing so would stop me from being able to rebase and actually fix them up. Just ping me when it's ready and I'll rebase properly.

@ChrisLovering ChrisLovering added the review: do not merge The PR can be reviewed but cannot be merged now label Nov 22, 2021
@ChrisLovering ChrisLovering removed the review: do not merge The PR can be reviewed but cannot be merged now label Nov 30, 2021
This includes a refactor to use a dataclass for clearer implementation.

Along with that, this changes the roles so that they're always available, but un-assignable roles are in red and give a different error.
Copy link
Copy Markdown
Contributor

@janine9vn janine9vn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You addressed all my previous concerns in #dev-contrib. Great feature and very nice code, thank you!

Copy link
Copy Markdown
Contributor

@Bluenix2 Bluenix2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition and QoL change - thanks Chris this looks good!

@ChrisLovering ChrisLovering merged commit 230e49b into main Dec 1, 2021
@ChrisLovering ChrisLovering deleted the subscribe-with-buttons branch December 1, 2021 22:32
@Xithrius Xithrius removed the s: needs review Author is waiting for someone to review and approve label Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) a: frontend Related to output and formatting p: 3 - low Low Priority t: feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants