Interface GenericUserPresenceEvent

All Superinterfaces:
GenericEvent
All Known Implementing Classes:
UserActivityEndEvent, UserActivityStartEvent, UserUpdateActivitiesEvent, UserUpdateActivityOrderEvent, UserUpdateOnlineStatusEvent

public interface GenericUserPresenceEvent extends GenericEvent
Indicates that the presence of a User has changed.
Users don't have presences directly, this is fired when a Member from a Guild changes their presence.

Can be used to track the presence updates of members.

Requirements

These events require the GUILD_PRESENCES intent to be enabled.
createDefault(String) and createLight(String) disable this by default!

Additionally, these events require the MemberCachePolicy to cache the updated members. Discord does not specifically tell us about the updates, but merely tells us the member was updated and gives us the updated member object. In order to fire a specific event like this we need to have the old member cached to compare against.

  • Method Details

    • getGuild

      @Nonnull Guild getGuild()
      Guild in which the presence has changed.
      Returns:
      The guild
    • getMember

      @Nonnull Member getMember()
      Member who changed their presence.
      Returns:
      The member