public class GuildVoiceStateImpl extends java.lang.Object implements GuildVoiceState
Constructor and Description |
---|
GuildVoiceStateImpl(Guild guild,
Member member) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
AudioChannel |
getAudioChannel() |
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 GuildVoiceState.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 GuildVoiceState.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. |
GuildVoiceStateImpl |
setConnectedChannel(VoiceChannel connectedChannel) |
GuildVoiceStateImpl |
setGuildDeafened(boolean guildDeafened) |
GuildVoiceStateImpl |
setGuildMuted(boolean guildMuted) |
GuildVoiceStateImpl |
setSelfDeafened(boolean selfDeafened) |
GuildVoiceStateImpl |
setSelfMuted(boolean selfMuted) |
GuildVoiceStateImpl |
setSessionId(java.lang.String sessionId) |
GuildVoiceStateImpl |
setSuppressed(boolean suppressed) |
java.lang.String |
toString() |
public boolean isSelfMuted()
VoiceState
Member
muted themselves.isSelfMuted
in interface VoiceState
public boolean isSelfDeafened()
VoiceState
Member
deafened themselves.isSelfDeafened
in interface VoiceState
public JDA getJDA()
VoiceState
JDA
instance of this VoiceStategetJDA
in interface VoiceState
public AudioChannel getAudioChannel()
getAudioChannel
in interface VoiceState
public java.lang.String getSessionId()
getSessionId
in interface VoiceState
public boolean isMuted()
GuildVoiceState
Member
is muted, either
by choice VoiceState.isSelfMuted()
()} or deafened by an admin GuildVoiceState.isGuildMuted()
isMuted
in interface GuildVoiceState
public boolean isDeafened()
GuildVoiceState
Member
is deafened, either
by choice VoiceState.isSelfDeafened()
()} or deafened by an admin GuildVoiceState.isGuildDeafened()
isDeafened
in interface GuildVoiceState
public boolean isGuildMuted()
GuildVoiceState
Member
got muted by an AdminisGuildMuted
in interface GuildVoiceState
public boolean isGuildDeafened()
GuildVoiceState
Member
got deafened by an AdminisGuildDeafened
in interface GuildVoiceState
public boolean isSuppressed()
GuildVoiceState
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 GuildVoiceState
Member's
audio is being suppressed.public VoiceChannel getChannel()
GuildVoiceState
VoiceChannel
that the Member
is in. If the Member
is currently not in a
VoiceChannel
, this returns null.getChannel
in interface GuildVoiceState
public Guild getGuild()
GuildVoiceState
Guild
of the Member's
VoiceChannel
If the User
is currently not in a VoiceChannel
, this returns nullgetGuild
in interface GuildVoiceState
public Member getMember()
GuildVoiceState
Member
corresponding to this VoiceState Object
(Backreference)getMember
in interface GuildVoiceState
public boolean inVoiceChannel()
GuildVoiceState
User
is currently in a VoiceChannel
in the Guild
returned from getGuild()
.false
, getChannel()
will return null
.inVoiceChannel
in interface GuildVoiceState
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 GuildVoiceStateImpl setConnectedChannel(VoiceChannel connectedChannel)
public GuildVoiceStateImpl setSessionId(java.lang.String sessionId)
public GuildVoiceStateImpl setSelfMuted(boolean selfMuted)
public GuildVoiceStateImpl setSelfDeafened(boolean selfDeafened)
public GuildVoiceStateImpl setGuildMuted(boolean guildMuted)
public GuildVoiceStateImpl setGuildDeafened(boolean guildDeafened)
public GuildVoiceStateImpl setSuppressed(boolean suppressed)