public class VoiceChannelImpl extends java.lang.Object implements VoiceChannel
Constructor and Description |
---|
VoiceChannelImpl(java.lang.String id,
Guild guild) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(VoiceChannel chan) |
RestAction<PermissionOverride> |
createPermissionOverride(Member member) |
RestAction<PermissionOverride> |
createPermissionOverride(Role role) |
RestAction<java.lang.Void> |
delete() |
boolean |
equals(java.lang.Object o) |
int |
getBitrate()
The audio bitrate of the voice audio that is played in this channel.
|
java.util.HashMap<java.lang.String,Member> |
getConnectedMembersMap() |
Guild |
getGuild()
Returns the
Guild that this Channel is part of. |
java.lang.String |
getId()
The Snowflake id of this entity.
|
JDA |
getJDA()
Returns the
JDA instance of this Channel |
ChannelManager |
getManager()
Returns the
ChannelManager for this Channel. |
ChannelManagerUpdatable |
getManagerUpdatable() |
java.util.HashMap<Member,PermissionOverride> |
getMemberOverrideMap() |
java.util.List<PermissionOverride> |
getMemberPermissionOverrides()
|
java.util.List<Member> |
getMembers()
A List of all
Members that are in this Channel
For TextChannels , this returns all Members with the Permission.MESSAGE_READ Permission. |
java.lang.String |
getName()
The human readable name of the Channel.
If no name has been set, this returns null. |
PermissionOverride |
getOverrideForMember(Member member)
The
PermissionOverride relating to the specified User . |
PermissionOverride |
getOverrideForRole(Role role)
The
PermissionOverride relating to the specified Role . |
java.util.List<PermissionOverride> |
getPermissionOverrides()
Gets all of the
PermissionOverrides that are part
of this Channel .This combines User and Role overrides. |
int |
getPosition()
The position this Channel is displayed at.
Higher values mean they are displayed lower in the Client. |
int |
getPositionRaw()
The actual position of the
Channel as stored and given by Discord. |
java.util.HashMap<Role,PermissionOverride> |
getRoleOverrideMap() |
java.util.List<PermissionOverride> |
getRolePermissionOverrides()
|
int |
getUserLimit()
The maximum amount of
Users that can be in this
VoiceChannel at one time. |
int |
hashCode() |
VoiceChannelImpl |
setBitrate(int bitrate) |
VoiceChannelImpl |
setName(java.lang.String name) |
VoiceChannelImpl |
setRawPosition(int rawPosition) |
VoiceChannelImpl |
setUserLimit(int userLimit) |
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getCreationTime
public VoiceChannelImpl(java.lang.String id, Guild guild)
public int getUserLimit()
VoiceChannel
getUserLimit
in interface VoiceChannel
public int getBitrate()
VoiceChannel
getBitrate
in interface VoiceChannel
public java.lang.String getName()
Channel
public Guild getGuild()
Channel
Guild
that this Channel is part of.public java.util.List<Member> getMembers()
Channel
Members
that are in this Channel
For TextChannels
, this returns all Members with the Permission.MESSAGE_READ
Permission.
In VoiceChannels
, this returns all Members that joined that VoiceChannel.getMembers
in interface Channel
Members
that are in this Channel.public int getPosition()
Channel
Guild
do not have to have continuous positionsgetPosition
in interface Channel
public int getPositionRaw()
Channel
Channel
as stored and given by Discord.
Role positions are actually based on a pairing of the creation time (as stored in the snowflake id)
and the position. If 2 or more roles share the same position then they are sorted based on their creation date.
The more recent a role was created, the lower it is in the hierachy. This is handled by Channel.getPosition()
and it is most likely the method you want. If, for some reason, you want the actual position of the
Role then this method will give you that value.getPositionRaw
in interface Channel
Channel
.public JDA getJDA()
Channel
JDA
instance of this Channelpublic PermissionOverride getOverrideForMember(Member member)
Channel
PermissionOverride
relating to the specified User
.
If there is no PermissionOverride
for this Channel
relating to the provided User
, then this returns null
.getOverrideForMember
in interface Channel
member
- The Member
whose PermissionOverride
is requested.PermissionOverride
relating to the provided User
.public PermissionOverride getOverrideForRole(Role role)
Channel
PermissionOverride
relating to the specified Role
.
If there is no PermissionOverride
for this Channel
relating to the provided Role
, then this returns null
.getOverrideForRole
in interface Channel
role
- The Role
whose PermissionOverride
is requested.PermissionOverride
relating to the provided Role
.public java.util.List<PermissionOverride> getPermissionOverrides()
Channel
PermissionOverrides
that are part
of this Channel
.User
and Role
overrides.
If you would like only User
overrides or only Role
overrides, use Channel.getMemberPermissionOverrides()
()} or Channel.getRolePermissionOverrides()
respectively.getPermissionOverrides
in interface Channel
PermissionOverrides
for this Channel
.public java.util.List<PermissionOverride> getMemberPermissionOverrides()
Channel
getMemberPermissionOverrides
in interface Channel
PermissionOverrides
for Member
for this Channel
.public java.util.List<PermissionOverride> getRolePermissionOverrides()
Channel
getRolePermissionOverrides
in interface Channel
PermissionOverrides
for Roles
for this Channel
.public ChannelManager getManager()
Channel
ChannelManager
for this Channel.
In the ChannelManager, you can modify the name, topic and position of this Channel.getManager
in interface Channel
public ChannelManagerUpdatable getManagerUpdatable()
getManagerUpdatable
in interface Channel
public RestAction<java.lang.Void> delete()
public RestAction<PermissionOverride> createPermissionOverride(Member member)
createPermissionOverride
in interface Channel
public RestAction<PermissionOverride> createPermissionOverride(Role role)
createPermissionOverride
in interface Channel
public java.lang.String getId()
ISnowflake
getId
in interface ISnowflake
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(VoiceChannel chan)
compareTo
in interface java.lang.Comparable<VoiceChannel>
public VoiceChannelImpl setName(java.lang.String name)
public VoiceChannelImpl setRawPosition(int rawPosition)
public VoiceChannelImpl setUserLimit(int userLimit)
public VoiceChannelImpl setBitrate(int bitrate)
public java.util.HashMap<Member,PermissionOverride> getMemberOverrideMap()
public java.util.HashMap<Role,PermissionOverride> getRoleOverrideMap()
public java.util.HashMap<java.lang.String,Member> getConnectedMembersMap()