Skip to content

The user is not on the Discord #1725

Discussion options

You must be logged in to vote

The getMemberById only checks for members in the cache, you can use retrieveMemberById(id) to check with a discord api call instead.

Example:

guild.retrieveMemberById(462552032734216203L).queue(
  member -> {
    player.sendMessage("Success");
  }, new ErrorHandler().handle(ErrorResponse.UNKNOWN_MEMBER, error -> {
    player.sendMessage("It seems you left");
  }));

See also:

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Angxstupst
Comment options

@MinnDevelopment
Comment options

@Angxstupst
Comment options

@MinnDevelopment
Comment options

Answer selected by MinnDevelopment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants