q1zZ
q1zZ

Reputation: 1

How to get user description and status?

how to get user description ("About me") and custom status in JDA?

screenshot

Upvotes: -1

Views: 628

Answers (1)

Volodymyr Nakvasiuk
Volodymyr Nakvasiuk

Reputation: 42

If I understand your question correctly, you can just use getUserByID(). Something like this:

import sx.blah.discord.api.IDiscordClient;
import sx.blah.discord.handle.obj.IUser;

// Initiate your 'client' as an instance of IDiscordClient
IDiscordClient client = ...;

// String userId = "1234567890";  // <- Uncomment this for tests.
// Get the user's profile information by some user ID
IUser user = client.getUserByID(userId);

// And then get the user's description and custom status
String description = user.getDescription();
String customStatus = user.getCustomStatus();

Hope, this will help you.

Upvotes: -1

Related Questions