JDA
JDA copied to clipboard
Add missing retrieveMessage methods to ReactionEvents
Pull Request Etiquette
- [x] I have checked the PRs for upcoming features/bug fixes.
- [x] I have read the contributing guidelines.
Changes
- [ ] Internal code
- [x] 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
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
No, because some subclasses like MessageDeleteEvent couldn't use this method
What about adding an interface like GenericMessageReactionRemoveEvent with the common code then?