public class RestUser extends Object
Modifier and Type | Method and Description |
---|---|
static RestUser |
create(RestClient restClient,
Snowflake id)
Create a
RestUser for a given ID. |
Mono<discord4j.discordjson.json.UserData> |
getData()
Retrieve this user's data upon subscription.
|
Mono<discord4j.discordjson.json.ChannelData> |
getPrivateChannel()
Requests to retrieve the private channel (DM) to this user.
|
public static RestUser create(RestClient restClient, Snowflake id)
RestUser
for a given ID. This method does not perform any API request.restClient
- the client to make API requestsid
- the ID of this entityRestUser
represented by this id
.public Mono<discord4j.discordjson.json.UserData> getData()
Mono
where, upon successful completion, emits the UserData
belonging to this user.
If an error is received, it is emitted through the Mono
.public final Mono<discord4j.discordjson.json.ChannelData> getPrivateChannel()
Mono
where, upon successful completion, emits the private channel
to
this user. If an error is received, it is emitted through the Mono
.