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

fix: Adding reactions to interaction response in menu pages #41

Merged

Conversation

DenverCoder1
Copy link
Collaborator

If there are reaction buttons, the full InteractionMessage must be fetched when send returns a PartialInteractionMessage.

PartialInteractionMessage does not support add_reactions, so it should not be returned when self.buttons contains elements.

This was working prior to nextcord 2.0.0b1 due to a statement that was intended to be future-proof:

message = await self.interaction.send(ephemeral=self.ephemeral, **kwargs)
return message or await self.interaction.original_message()

As prior to 2.0.0b1, message would always be None, this worked fine. When using nextcord 2.0.0b1 or later, this does not work for reaction menus.

BREAKING CHANGE

As this module now uses nextcord.PartialInteractionMessage in type checks, nextcord >= 2.0.0b1 is now required to run the module. When using 2.0.0a10 or earlier, there will be an error, module 'nextcord' has no attribute 'PartialInteractionMessage'.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
    • I have run task pyright and fixed the relevant issues.
  • 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, ...)

If there are reaction buttons, the full InteractionMessage must be fetched if send returns a PartialInteractionMessage.
Copy link
Member

@ooliver1 ooliver1 left a comment

Choose a reason for hiding this comment

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

could requirements.txt be locked to >=b1 so users cannot use the latest update that is incompatible without updating nextcord?

@DenverCoder1 DenverCoder1 added t: bug Type: bug - something isn't working p: high Priority: high - should be worked on as soon as reasonable s: awaiting review Status: the issue or PR is awaiting reviews labels Jun 26, 2022
@DenverCoder1 DenverCoder1 merged commit 9ca03c4 into nextcord:master Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: high Priority: high - should be worked on as soon as reasonable s: awaiting review Status: the issue or PR is awaiting reviews t: bug Type: bug - something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants