Class VoiceStateImpl
java.lang.Object
com.mewna.catnip.entity.impl.user.VoiceStateImpl
- All Implemented Interfaces:
Entity
,GuildEntity
,HasChannel
,HasGuild
,Timestamped
,RequiresCatnip
,VoiceState
- Since:
- 9/21/18.
- Author:
- amy
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mewna.catnip.entity.partials.Timestamped
Timestamped.TimestampStyle
-
Constructor Summary
ConstructorDescriptionVoiceStateImpl
(Catnip catnip, long guildIdAsLong, long channelIdAsLong, long userIdAsLong, String sessionId, boolean deaf, boolean mute, boolean selfDeaf, boolean selfMute, boolean suppress, boolean selfStream, String requestToSpeakTimestampRaw) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
catnip()
Returns the catnip instance associated with this entity.void
long
channelIdAsLong
(long channelIdAsLong) boolean
deaf()
deaf
(boolean deaf) long
The id of the guild this entity is from.guildIdAsLong
(long guildIdAsLong) boolean
mute()
mute
(boolean mute) requestToSpeakTimestampRaw
(String requestToSpeakTimestampRaw) boolean
selfDeaf()
selfDeaf
(boolean selfDeaf) boolean
selfMute()
selfMute
(boolean selfMute) boolean
selfStream
(boolean selfStream) boolean
suppress()
suppress
(boolean suppress) toString()
long
userIdAsLong
(long userIdAsLong) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.mewna.catnip.entity.partials.GuildEntity
guild
Methods inherited from interface com.mewna.catnip.entity.partials.HasChannel
channelId
Methods inherited from interface com.mewna.catnip.entity.partials.Timestamped
asDiscordTimestamp, parseTimestamp
Methods inherited from interface com.mewna.catnip.entity.user.VoiceState
channel, member, requestToSpeakTimestamp, user, userId
-
Constructor Details
-
VoiceStateImpl
public VoiceStateImpl() -
VoiceStateImpl
-
-
Method Details
-
catnip
- Specified by:
catnip
in interfaceRequiresCatnip
-
toString
-
builder
-
catnip
Description copied from interface:Entity
Returns the catnip instance associated with this entity. -
guildIdAsLong
public long guildIdAsLong()Description copied from interface:HasGuild
The id of the guild this entity is from.- Specified by:
guildIdAsLong
in interfaceHasGuild
- Returns:
- Long representing the guild ID.
-
channelIdAsLong
public long channelIdAsLong()- Specified by:
channelIdAsLong
in interfaceHasChannel
-
userIdAsLong
public long userIdAsLong()- Specified by:
userIdAsLong
in interfaceVoiceState
- Returns:
- The user's id.
-
sessionId
- Specified by:
sessionId
in interfaceVoiceState
- Returns:
- The session id for this voice state. Only known for the current user.
-
deaf
public boolean deaf()- Specified by:
deaf
in interfaceVoiceState
- Returns:
- Whether the user has been deafened.
-
mute
public boolean mute()- Specified by:
mute
in interfaceVoiceState
- Returns:
- Whether the user has been muted.
-
selfDeaf
public boolean selfDeaf()- Specified by:
selfDeaf
in interfaceVoiceState
- Returns:
- Whether the user has deafened themself.
-
selfMute
public boolean selfMute()- Specified by:
selfMute
in interfaceVoiceState
- Returns:
- Whether the user has muted themself.
-
suppress
public boolean suppress()- Specified by:
suppress
in interfaceVoiceState
- Returns:
- Whether the user has been suppressed.
-
selfStream
public boolean selfStream()- Specified by:
selfStream
in interfaceVoiceState
- Returns:
- Whether the user is currently streaming (go live).
-
requestToSpeakTimestampRaw
- Specified by:
requestToSpeakTimestampRaw
in interfaceVoiceState
-
guildIdAsLong
- Returns:
this
.
-
channelIdAsLong
- Returns:
this
.
-
userIdAsLong
- Returns:
this
.
-
sessionId
- Returns:
this
.
-
deaf
- Returns:
this
.
-
mute
- Returns:
this
.
-
selfDeaf
- Returns:
this
.
-
selfMute
- Returns:
this
.
-
suppress
- Returns:
this
.
-
selfStream
- Returns:
this
.
-
requestToSpeakTimestampRaw
- Returns:
this
.
-