Skip to content
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

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

Closed
3 tasks done
Revnoplex opened this issue Jan 16, 2023 · 4 comments · Fixed by #2594
Closed
3 tasks done
Labels
on hold priority: medium Medium Priority unconfirmed bug A bug report that needs triaging
Milestone

Comments

@Revnoplex
Copy link
Contributor

Summary

This seems to be happening with Paginator.edit() in all cases ive been able to test

Reproduction Steps

Send a message using e.g. ctx.respond or ctx.send
create a paginator object
and use await paginator.edit(message) to add the paginator view to the message
The buttons appear, but they dont work, this also occurs when using a previous view in the initial message which items from that become unresponsive too.

Minimal Reproducible Code

async def test_cmd(self, ctx: bridge.BridgeContext):
    embed = utils.minimal_embed("Hello World")
    message = await ctx.respond(embed=embed)
    if isinstance(message, discord.Interaction):
        message = await message.original_response()
    if isinstance(message, (discord.WebhookMessage, discord.PartialMessage)):
        message = self.client.get_message(message.id)
    paginator = pages.Paginator(pages=["message 1", "message 2", "message 3", "message 4"])
    await paginator.edit(message)

Expected Results

The buttons should respond like other views when they are edited, they work fine

Actual Results

Instead I get a "This Interaction Failed" when clicking any of the buttons

Intents

all

System Information

discord/main.py:47: DeprecationWarning: VersionInfo.releaselevel is deprecated since version 2.3, consider using release_level instead.
"- py-cord v{0.major}.{0.minor}.{0.micro}-{0.releaselevel}".format(version_info)
discord/main.py:49: DeprecationWarning: VersionInfo.releaselevel is deprecated since version 2.3, consider using release_level instead.
if version_info.releaselevel != "final":

  • Python v3.10.9-final
  • py-cord v2.3.2-final
  • aiohttp v3.8.3
  • system info: Linux 6.1.6-arch1-1 #​1 SMP PREEMPT_DYNAMIC Sat, 14 Jan 2023 13:09:35 +0000

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

No response

@Revnoplex Revnoplex added the unconfirmed bug A bug report that needs triaging label Jan 16, 2023
@Lulalaby Lulalaby added the priority: medium Medium Priority label Feb 9, 2023
@Lulalaby Lulalaby added this to the v2.5 milestone Feb 10, 2023
@OmLanke
Copy link
Contributor

OmLanke commented May 8, 2023

This might be fixed by #1997. Can you test if this error persists on the master branch?

@Revnoplex
Copy link
Contributor Author

Revnoplex commented May 9, 2023

Nope, still same behaviour with the same code on 2.4.1.dev88+ga09e728f (commit a09e728)

@Revnoplex
Copy link
Contributor Author

For now the pages.Paginator(author_check=False) is a working workaround

@OmLanke
Copy link
Contributor

OmLanke commented Jun 25, 2023

For now the pages.Paginator(author_check=False) is a working workaround

How about manually setting paginator.user to ctx.author after using paginator.edit? That might work too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold priority: medium Medium Priority unconfirmed bug A bug report that needs triaging
Projects
None yet
4 participants