The user is not on the Discord #1725
Answered
by
MinnDevelopment
Angxstupst
asked this question in
Questions and Help
-
Hey, I have a little problem. When the code run, become I get this message even though I'm on the Discord. It seems that you left our Discord server! Here the code:
|
Beta Was this translation helpful? Give feedback.
Answered by
MinnDevelopment
Jul 11, 2021
Replies: 1 comment 4 replies
-
The Example: guild.retrieveMemberById(462552032734216203L).queue(
member -> {
player.sendMessage("Success");
}, new ErrorHandler().handle(ErrorResponse.UNKNOWN_MEMBER, error -> {
player.sendMessage("It seems you left");
})); See also: |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
MinnDevelopment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
getMemberById
only checks for members in the cache, you can useretrieveMemberById(id)
to check with a discord api call instead.Example:
See also: