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

Add interaction related message flags #1790

Conversation

freya022
Copy link
Contributor

@freya022 freya022 commented Aug 27, 2021

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: NaN

Description

This adds the EPHEMERAL and LOADING message flags, the ephemeral flag is particularly useful as you can't determine if a message is ephemeral by checking if GenericComponentInteractionEvent#getMessage is null

Also fixes docs for ComponentInteraction#getMessage and enables editButton and editSelectionMenu methods

@freya022 freya022 marked this pull request as ready for review August 27, 2021 18:59
Copy link
Member

@MinnDevelopment MinnDevelopment left a comment

Choose a reason for hiding this comment

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

I think methods such as addReaction, pin, and editMessage should check for this flag and throw an exception. You can't use these methods on ephemeral messages since you get an unknown message error response.

Copy link
Member

@MinnDevelopment MinnDevelopment left a comment

Choose a reason for hiding this comment

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

You likely need to update the throws docs on these methods to reflect the behavior on ephemeral messages

freya022 and others added 5 commits August 31, 2021 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants