Package discord4j.core.event.domain
Class UserUpdateEvent
- java.lang.Object
-
- discord4j.core.event.domain.Event
-
- discord4j.core.event.domain.UserUpdateEvent
-
public class UserUpdateEvent extends Event
Dispatched when the bot's user is updated.PresenceUpdateEventis dispatched for users the bot is receiving.This event is dispatched by Discord.
- See Also:
- User Update
-
-
Constructor Summary
Constructors Constructor Description UserUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, User current, User old)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UsergetCurrent()Gets the current, new version of theUserthat has been updated in this event.Optional<User>getOld()Gets the old version of theUserthat has been updated in this event, if present.StringtoString()-
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
-
-
-
Constructor Detail
-
UserUpdateEvent
public UserUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, User current, @Nullable User old)
-
-
Method Detail
-
getCurrent
public User getCurrent()
Gets the current, new version of theUserthat has been updated in this event.- Returns:
- The current version of the
Userupdated in this event.
-
getOld
public Optional<User> getOld()
Gets the old version of theUserthat has been updated in this event, if present. This may not be available ifUsersare not stored.- Returns:
- The old version of the
Userthat has been updated in this event, if present.
-
-