Javacord
Javacord copied to clipboard
Expose the Member interface
Any help is appreciated and for open tasks see #1148
I can't test the whole PR so I think it would be better to merge this PR after the next release so people can try out the snapshot version long enough to test it. There are 100% things missing that still need to be adjusted due to that Javacord grow with the User interface.
Changes
- The own Bot member is now always cached regardless of what the usercache is set to
- Moved channel permission checks into their own interface if they are used for multiple channels (text, voice)
- Fixed UserChangeStatusEvent dispatching multiple times even though the status is the same (happened if the user shared multiple servers with the bot)
- Added Server#getMembersByRole
Breaking:
- Renamed Server#requestMember(long) to requestMemberById.
- Moved member specific methods from User and Server interface to Member.
- Removed Role#hasUser because a member object is required.
- Removed a lot of methods from the MessageAuthor as they are duplicated with the ones already in the member. For that an asMember method has been added.
- Renamed and moved some listeners and event for members
- Methods that returned an User object now return a Member if it's appropriate
- Removed permission check methods from the MessageAuthor interface
will have a look