Package discord4j.core.object.presence
Class ClientPresence
java.lang.Object
discord4j.core.object.presence.ClientPresence
Presence data that can be sent to Discord.
This is as opposed to Presence
which is received from Discord.
Each static factory corresponds to a Status
with an optional ClientActivity
.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClientPresence
Creates ado not disturb
presence.static ClientPresence
doNotDisturb
(ClientActivity activity) Creates ado not disturb
presence.discord4j.discordjson.json.gateway.StatusUpdate
Converts this presence's data to an object for use by the gateway.static ClientPresence
idle()
Creates anidle
presence.static ClientPresence
idle
(ClientActivity activity) Creates anidle
presence.static ClientPresence
Creates anStatus.INVISIBLE
presence.static ClientPresence
of
(Status status, ClientActivity activity) Creates a presence with the given status and activity.static ClientPresence
online()
Creates anonline
presence.static ClientPresence
online
(ClientActivity activity) Creates anonline
presence.
-
Method Details
-
online
Creates anonline
presence.- Returns:
- An online presence.
-
online
Creates anonline
presence.- Parameters:
activity
- The activity to be shown.- Returns:
- An online presence with the given activity.
-
doNotDisturb
Creates ado not disturb
presence.- Returns:
- A do not disturb presence.
-
doNotDisturb
Creates ado not disturb
presence.- Parameters:
activity
- The activity to be shown.- Returns:
- A do not disturb with the given activity.
-
idle
Creates anidle
presence.- Returns:
- An idle presence.
-
idle
Creates anidle
presence.- Parameters:
activity
- The activity to be shown.- Returns:
- An idle presence with the given activity.
-
invisible
Creates anStatus.INVISIBLE
presence.- Returns:
- An invisible presence.
-
of
Creates a presence with the given status and activity.- Parameters:
status
- The status to be shown.activity
- The activity to be shown.- Returns:
- A presence with the given status and activity.
-
getStatusUpdate
public discord4j.discordjson.json.gateway.StatusUpdate getStatusUpdate()Converts this presence's data to an object for use by the gateway.- Returns:
- An equivalent
StatusUpdate
for this presence.
-