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 the request method for member,guild,role,channel and other #814
Comments
Hello, before making an issue for stuff like this, please check the documentations or try out your IDE's autocomplete or ask in Discord where most people would most likely be able to help you faster. To answer this issue, such method already exists under As for members, it is under Server with a similar name. All documentation links are listed below, though the member should return as an Optional since most members if not all should be cached in the current implementation (as long as you have GUILD_MEMBERS intent). But if it is not then you can request the user from DiscordApi which will check first through the cache and requests it if it isn't cached. (Then again, both methods returns the same output which is a user). https://docs.javacord.org/api/v/3.3.2/org/javacord/api/DiscordApi.html#getUserById-long- https://docs.javacord.org/api/v/3.3.2/org/javacord/api/entity/server/Server.html#getMemberById-long- |
I think the problem is, that there's no method to get a member (i.e., a user that has also role information). For other entities, I don't think that we can provide such methods. I'm not sure, whether or not Discord even offers such endpoints, but if it does, we would run into problems with related entities. |
I need Server#requestMemberById method (request) that returns CompletableFuture, |
This issue seems similar to #928. I will be implementing this. |
It is necessary to add the ability to get an object by ID. I want to check if there is a member on the server, but if the member is not cached, then I cannot do this, so I need a method similar to .requestMember(id: long) that would return CompletableFuture<Optional that is , if there is such a member on the server, it will return User to me, if not, then null
The text was updated successfully, but these errors were encountered: