public class PresenceUpdateEvent extends Event
The old presence may not be present if presences are not stored.
This event is dispatched by Discord.
Constructor and Description |
---|
PresenceUpdateEvent(DiscordClient client,
long guildId,
User oldUser,
JsonNode user,
Presence current,
Presence old) |
Modifier and Type | Method and Description |
---|---|
Presence |
getCurrent()
Gets the current, new version of the
Presence . |
Mono<Guild> |
getGuild()
|
Snowflake |
getGuildId()
|
Mono<Member> |
getMember()
|
Optional<String> |
getNewAvatar()
Gets the
User 's new avatar, if present. |
Optional<String> |
getNewDiscriminator()
Gets the
User 's new discriminator, if present. |
Optional<String> |
getNewUsername()
Gets the
User 's new username, if present. |
Optional<Presence> |
getOld()
Gets the old version of the
Presence that was changed, if present. |
Optional<User> |
getOldUser()
Gets the old version of the
User that was updated, if present. |
Mono<User> |
getUser()
Requests to retrieve the
User whose presence has been changed in this event. |
Snowflake |
getUserId()
|
String |
toString() |
public Optional<User> getOldUser()
User
that was updated, if present.
This may not be available if Users
are not stored.User
, if present.public Optional<String> getNewUsername()
User
's new username, if present. This may not exist if the user
's username has not
been changed.User
's new username, if present.public Optional<String> getNewDiscriminator()
User
's new discriminator, if present.
This may not exist if the User
's discriminator has not been changed.User
's new discriminator, if present.public Optional<String> getNewAvatar()
User
's new avatar, if present. This may not exist if the User
's discriminator has not
been changed.public Mono<User> getUser()
User
whose presence has been changed in this event.public Presence getCurrent()
Presence
.Presence
.public Optional<Presence> getOld()
Presence
that was changed, if present.
This may not be available if Presence
are not stored.Presence
, if present.