Skip to content

feat(ext.pages): add more ways to send paginator by editing#2105

Closed
OmLanke wants to merge 32 commits into
Pycord-Development:masterfrom
OmLanke:paginator
Closed

feat(ext.pages): add more ways to send paginator by editing#2105
OmLanke wants to merge 32 commits into
Pycord-Development:masterfrom
OmLanke:paginator

Conversation

@OmLanke

@OmLanke OmLanke commented Jun 8, 2023

Copy link
Copy Markdown
Contributor

Summary

Allows the Paginator to be sent using the edit methods offered by Interaction, ApplicationContext, and BridgeContext.

Also fixes #1877 by adding a new parameter user, when passing a Message object.

paginator.edit() didn't work at all, because paginator.user was being set to message.author. But message.author will always be the bot itself, since it can edit that message. This caused the views to not respond, unless author_check was disabled. This means a user would need be to be explicitly accepted while calling paginator.edit(), thus the new parameter.

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@OmLanke OmLanke changed the title feat(ext.pages): add more ways to send via edit feat(ext.pages): add more ways to send paginator via edit Jun 8, 2023
@OmLanke OmLanke changed the title feat(ext.pages): add more ways to send paginator via edit feat(ext.pages): add more ways to send paginator by editing Jun 8, 2023
@Lulalaby Lulalaby changed the title feat(ext.pages): add more ways to send paginator by editing feat!(ext.pages): add more ways to send paginator by editing Jun 8, 2023
@Lulalaby Lulalaby changed the title feat!(ext.pages): add more ways to send paginator by editing feat!: ext.pages: add more ways to send paginator by editing Jun 8, 2023
@OmLanke

OmLanke commented Jun 11, 2023

Copy link
Copy Markdown
Contributor Author

On hold. There is parameter discrepancy between methods.

Interaction.edit_original_response doesn't accept suppress kwarg, since discord doesn't support it for webhook message edits.

InteractionResponse.edit_message doesn't seem to accept suppress and allowed_mention kwargs, even though it looks like discord accepts it in the flags (link)?

@OmLanke

OmLanke commented Jun 23, 2023

Copy link
Copy Markdown
Contributor Author

Should be good after #2138 is merged

@OmLanke OmLanke marked this pull request as ready for review June 25, 2023 14:47
@OmLanke OmLanke requested a review from a team as a code owner June 25, 2023 14:47
@pullapprove4 pullapprove4 Bot requested a review from FrostByte266 June 25, 2023 14:47
@pullapprove4 pullapprove4 Bot requested a review from plun1331 June 25, 2023 14:47
OmLanke and others added 3 commits June 25, 2023 20:47
Signed-off-by: Om <92863779+Om1609@users.noreply.github.com>
Signed-off-by: Om <92863779+Om1609@users.noreply.github.com>
@Lulalaby Lulalaby enabled auto-merge (squash) June 25, 2023 16:25
Lulalaby
Lulalaby previously approved these changes Jun 25, 2023
@JustaSqu1d JustaSqu1d self-requested a review July 11, 2023 18:37
Comment thread discord/ext/pages/pagination.py Outdated
Signed-off-by: Om <92863779+Om1609@users.noreply.github.com>
@OmLanke OmLanke changed the title feat(ext.pages)!: add more ways to send paginator by editing feat(ext.pages): add more ways to send paginator by editing Jul 14, 2023
Signed-off-by: Om <92863779+Om1609@users.noreply.github.com>
Comment thread discord/ext/pages/pagination.py
Comment thread CHANGELOG.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Paginator View doesn't respond if paginator buttons were added via editing the message

4 participants