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.PresenceUpdateEvent
is 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 User
getCurrent()
Gets the current, new version of theUser
that has been updated in this event.Optional<User>
getOld()
Gets the old version of theUser
that has been updated in this event, if present.String
toString()
-
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 theUser
that has been updated in this event.- Returns:
- The current version of the
User
updated in this event.
-
getOld
public Optional<User> getOld()
Gets the old version of theUser
that has been updated in this event, if present. This may not be available ifUsers
are not stored.- Returns:
- The old version of the
User
that has been updated in this event, if present.
-
-