public interface Presence
Modifier and Type | Method and Description |
---|---|
Game |
getGame()
The current Game for this session.
|
JDA |
getJDA()
The JDA instance of this Presence
|
OnlineStatus |
getStatus()
The current OnlineStatus for this session.
|
boolean |
isIdle()
Whether the current session is marked as afk or not.
|
void |
setGame(Game game)
Sets the
Game for this session. |
void |
setIdle(boolean idle)
Sets whether this session should be marked as afk or not
|
void |
setStatus(OnlineStatus status)
Sets the
OnlineStatus for this session |
JDA getJDA()
OnlineStatus getStatus()
OnlineStatus
of the current sessionGame getGame()
Game
of the current session or null if no game is setboolean isIdle()
This is relevant to client accounts to monitor whether new messages should trigger mobile push-notifications.
void setStatus(OnlineStatus status)
OnlineStatus
for this sessionstatus
- the OnlineStatus
to be used (OFFLINE/null -> INVISIBLE)java.lang.IllegalArgumentException
- if the provided OnlineStatus is UNKNOWN
void setGame(Game game)
Game
for this session.
Game.of(String)
.
For streams you provide a valid streaming url as second parametergame
- A Game
instance or null to resetGame.of(String)
,
Game.of(String, String)
void setIdle(boolean idle)
This is relevant to client accounts to monitor whether new messages should trigger mobile push-notifications.
idle
- boolean