public class VoiceStateImpl extends java.lang.Object implements VoiceState
Constructor and Description |
---|
VoiceStateImpl(Guild guild,
Member member) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
VoiceChannel |
getChannel()
Returns the current
VoiceChannel that the Member
is in. |
Guild |
getGuild()
Returns the current
Guild of the Member's
VoiceChannel
If the User is currently not in a VoiceChannel , this returns null |
JDA |
getJDA()
Returns the
JDA instance of this VoiceState |
Member |
getMember()
Returns the
Member corresponding to this VoiceState Object
(Backreference) |
java.lang.String |
getSessionId() |
int |
hashCode() |
boolean |
inVoiceChannel()
Used to determine if the
User is currently in a VoiceChannel
in the Guild returned from getGuild() .If this is false , getChannel() will return null . |
boolean |
isDeafened()
Returns whether the
Member is deafened, either
by choice VoiceState.isSelfDeafened() ()} or deafened by an admin VoiceState.isGuildDeafened() |
boolean |
isGuildDeafened()
Returns whether the
Member got deafened by an Admin |
boolean |
isGuildMuted()
Returns whether the
Member got muted by an Admin |
boolean |
isMuted()
Returns whether the
Member is muted, either
by choice VoiceState.isSelfMuted() ()} or deafened by an admin VoiceState.isGuildMuted() |
boolean |
isSelfDeafened()
Returns whether the
Member deafened themselves. |
boolean |
isSelfMuted()
Returns whether the
Member muted themselves. |
boolean |
isSuppressed()
Returns true if this
Member is unable to speak because the
channel is actively suppressing audio communication. |
VoiceStateImpl |
setConnectedChannel(VoiceChannel connectedChannel) |
VoiceStateImpl |
setGuildDeafened(boolean guildDeafened) |
VoiceStateImpl |
setGuildMuted(boolean guildMuted) |
VoiceStateImpl |
setSelfDeafened(boolean selfDeafened) |
VoiceStateImpl |
setSelfMuted(boolean selfMuted) |
VoiceStateImpl |
setSessionId(java.lang.String sessionId) |
VoiceStateImpl |
setSuppressed(boolean suppressed) |
java.lang.String |
toString() |
public boolean isMuted()
VoiceState
Member
is muted, either
by choice VoiceState.isSelfMuted()
()} or deafened by an admin VoiceState.isGuildMuted()
isMuted
in interface VoiceState
public boolean isSelfMuted()
VoiceState
Member
muted themselves.isSelfMuted
in interface VoiceState
public boolean isGuildMuted()
VoiceState
Member
got muted by an AdminisGuildMuted
in interface VoiceState
public boolean isDeafened()
VoiceState
Member
is deafened, either
by choice VoiceState.isSelfDeafened()
()} or deafened by an admin VoiceState.isGuildDeafened()
isDeafened
in interface VoiceState
public boolean isSelfDeafened()
VoiceState
Member
deafened themselves.isSelfDeafened
in interface VoiceState
public boolean isGuildDeafened()
VoiceState
Member
got deafened by an AdminisGuildDeafened
in interface VoiceState
public boolean isSuppressed()
VoiceState
Member
is unable to speak because the
channel is actively suppressing audio communication. This occurs only in
VoiceChannels
where the Member either doesn't have
Permission#VOICE_SPEAK
or if the channel is the
designated AFK channel.isSuppressed
in interface VoiceState
Member's
audio is being suppressed.public VoiceChannel getChannel()
VoiceState
VoiceChannel
that the Member
is in. If the Member
is currently not in a
VoiceChannel
, this returns null.getChannel
in interface VoiceState
public Guild getGuild()
VoiceState
Guild
of the Member's
VoiceChannel
If the User
is currently not in a VoiceChannel
, this returns nullgetGuild
in interface VoiceState
public Member getMember()
VoiceState
Member
corresponding to this VoiceState Object
(Backreference)getMember
in interface VoiceState
public JDA getJDA()
VoiceState
JDA
instance of this VoiceStategetJDA
in interface VoiceState
public java.lang.String getSessionId()
getSessionId
in interface VoiceState
public boolean inVoiceChannel()
VoiceState
User
is currently in a VoiceChannel
in the Guild
returned from getGuild()
.false
, getChannel()
will return null
.inVoiceChannel
in interface VoiceState
User
is currently in a VoiceChannel
in this Guild
.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public VoiceStateImpl setConnectedChannel(VoiceChannel connectedChannel)
public VoiceStateImpl setSessionId(java.lang.String sessionId)
public VoiceStateImpl setSelfMuted(boolean selfMuted)
public VoiceStateImpl setSelfDeafened(boolean selfDeafened)
public VoiceStateImpl setGuildMuted(boolean guildMuted)
public VoiceStateImpl setGuildDeafened(boolean guildDeafened)
public VoiceStateImpl setSuppressed(boolean suppressed)