Package net.dv8tion.jda.api.events.user
Class UserActivityStartEvent
- java.lang.Object
-
- net.dv8tion.jda.api.events.Event
-
- net.dv8tion.jda.api.events.user.GenericUserEvent
-
- net.dv8tion.jda.api.events.user.UserActivityStartEvent
-
- All Implemented Interfaces:
GenericEvent,GenericUserPresenceEvent
public class UserActivityStartEvent extends GenericUserEvent implements GenericUserPresenceEvent
Indicates that aUserhas started anActivityin aGuild.This is fired for every
Guildthe user is part of. If the title of a stream changes a start event is fired before an end event which will replace the activity.The activities of the
Memberare updated before all the start/end events are fired. This means you can checkMember.getActivities()when handling this event and it will already contain all new activities, even ones that have not yet fired the start event.
-
-
Constructor Summary
Constructors Constructor Description UserActivityStartEvent(JDA api, long responseNumber, Member member, Activity newActivity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GuildgetGuild()Guild in which the presence has changed.MembergetMember()Member who changed their presence.ActivitygetNewActivity()The new activity-
Methods inherited from class net.dv8tion.jda.api.events.user.GenericUserEvent
getUser
-
Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.dv8tion.jda.api.events.GenericEvent
getJDA, getResponseNumber
-
-
-
-
Method Detail
-
getNewActivity
public Activity getNewActivity()
The new activity- Returns:
- The activity
-
getGuild
public Guild getGuild()
Description copied from interface:GenericUserPresenceEventGuild in which the presence has changed.- Specified by:
getGuildin interfaceGenericUserPresenceEvent- Returns:
- The guild
-
getMember
public Member getMember()
Description copied from interface:GenericUserPresenceEventMember who changed their presence.- Specified by:
getMemberin interfaceGenericUserPresenceEvent- Returns:
- The member
-
-