public interface Channel extends ISnowflake
Guild
channel.Modifier and Type | Method and Description |
---|---|
RestAction<PermissionOverride> |
createPermissionOverride(Member member) |
RestAction<PermissionOverride> |
createPermissionOverride(Role role) |
RestAction<java.lang.Void> |
delete() |
Guild |
getGuild()
Returns the
Guild that this Channel is part of. |
JDA |
getJDA()
Returns the
JDA instance of this Channel |
ChannelManager |
getManager()
Returns the
ChannelManager for this Channel. |
ChannelManagerUpdatable |
getManagerUpdatable() |
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.List<PermissionOverride> |
getRolePermissionOverrides()
|
getCreationTime, getId
java.lang.String getName()
Guild getGuild()
Guild
that this Channel is part of.Guild
that this Channel is part of.java.util.List<Member> getMembers()
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.Members
that are in this Channel.int getPosition()
Guild
do not have to have continuous positionsint getPositionRaw()
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 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.Channel
.JDA getJDA()
JDA
instance of this ChannelPermissionOverride getOverrideForMember(Member member)
PermissionOverride
relating to the specified User
.
If there is no PermissionOverride
for this Channel
relating to the provided User
, then this returns null
.member
- The Member
whose PermissionOverride
is requested.PermissionOverride
relating to the provided User
.PermissionOverride getOverrideForRole(Role role)
PermissionOverride
relating to the specified Role
.
If there is no PermissionOverride
for this Channel
relating to the provided Role
, then this returns null
.role
- The Role
whose PermissionOverride
is requested.PermissionOverride
relating to the provided Role
.java.util.List<PermissionOverride> getPermissionOverrides()
PermissionOverrides
that are part
of this Channel
.User
and Role
overrides.
If you would like only User
overrides or only Role
overrides, use getMemberPermissionOverrides()
()} or getRolePermissionOverrides()
respectively.PermissionOverrides
for this Channel
.java.util.List<PermissionOverride> getMemberPermissionOverrides()
PermissionOverrides
for Member
for this Channel
.java.util.List<PermissionOverride> getRolePermissionOverrides()
PermissionOverrides
for Roles
for this Channel
.ChannelManager getManager()
ChannelManager
for this Channel.
In the ChannelManager, you can modify the name, topic and position of this Channel.ChannelManagerUpdatable getManagerUpdatable()
RestAction<java.lang.Void> delete()
RestAction<PermissionOverride> createPermissionOverride(Member member)
RestAction<PermissionOverride> createPermissionOverride(Role role)