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 missing retrieveMessage methods to ReactionEvents #2604

Closed
wants to merge 0 commits into from

Conversation

Kaktushose
Copy link
Contributor

Pull Request Etiquette

Changes

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

Description

Adds a retrieveMessage method to the MessageReactionRemoveAllEvent and MessageReactionRemoveEmojiEvent. While it's just a shortcut for getChannel().retrieveMessageById(getMessageId()) and can therefore be seen as redundant and syntatic sugar, the GenericMessageReactionEvent also has such a method. So this addition makes the API more consistent

@duncte123
Copy link
Contributor

Wouldn't it be better to move this to the GenericMessageEvent class instead? Seems right now that you are just repeating the same code a few times

@Kaktushose
Copy link
Contributor Author

No, because some subclasses like MessageDeleteEvent couldn't use this method

@yoyosource
Copy link
Contributor

yoyosource commented Jul 11, 2024

What about adding an interface like GenericMessageReactionRemoveEvent with the common code then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants