Skip to content

Fix help embed views#2197

Merged
ChrisLovering merged 2 commits into
mainfrom
fix_return_button
Jun 22, 2022
Merged

Fix help embed views#2197
ChrisLovering merged 2 commits into
mainfrom
fix_return_button

Conversation

@mbaruh
Copy link
Copy Markdown
Member

@mbaruh mbaruh commented Jun 17, 2022

Due to various breaking changes in the discord.py library the views of the help embed stopped working properly.

  • Use add_item in CommandView. This was done in GroupView but was apparently missed in CommandView, and the former (hacky) method no longer works.
  • Instead of editing the help message normally (which required to then defer the response), the message edit is made to be the response itself. It seems like the callback would automatically defer the response if none was made, but that no longer happens. Thanks to @onerandomusername for pointing me to the right method.

Due to various breaking changes in the discord.py library the views of the help embed stopped working properly.

- Use `add_item` in `CommandView`. This was done in GroupView but was apparently missed in `CommandView`, and the former (hacky) method no longer works.
- Instead of editing the help message normally (which required to then defer the response), the message edit is made to be the response itself. It seems like the callback would automatically defer the response if none was made, but that no longer happens.
@mbaruh mbaruh requested review from Den4200 and jb3 as code owners June 17, 2022 09:54
@mbaruh mbaruh added t: bug Something isn't working a: frontend Related to output and formatting p: 2 - normal Normal Priority a: information Related to information commands: (doc, help, information, reddit, site, tags) labels Jun 17, 2022
Copy link
Copy Markdown
Contributor

@MarkKoz MarkKoz left a comment

Choose a reason for hiding this comment

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

I'm not familiar with the interactions API, so I can't be effective in reviewing the code. I can't even find where it's documented. However, these changes do work in practice.

@ChrisLovering ChrisLovering enabled auto-merge June 22, 2022 13:46
@ChrisLovering ChrisLovering merged commit 38fe962 into main Jun 22, 2022
@ChrisLovering ChrisLovering deleted the fix_return_button branch June 22, 2022 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: frontend Related to output and formatting a: information Related to information commands: (doc, help, information, reddit, site, tags) p: 2 - normal Normal Priority t: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants