public interface Channel
Guild
channel.Modifier and Type | Method and Description |
---|---|
boolean |
checkPermission(User user,
Permission permission)
Checks if the given
User has the given Permission
in this Channel |
PermissionOverrideManager |
createPermissionOverride(Role role)
Creates a new
PermissionOverride for a given Role . |
PermissionOverrideManager |
createPermissionOverride(User user)
Creates a new
PermissionOverride for a given User . |
Guild |
getGuild()
Returns the
Guild that this Channel is part of. |
java.lang.String |
getId()
The Id of the Channel.
|
JDA |
getJDA()
Returns the
JDA instance of this Channel |
ChannelManager |
getManager()
Returns the
ChannelManager for this Channel. |
java.lang.String |
getName()
The human readable name of the Channel.
If no name has been set, this returns null. |
PermissionOverride |
getOverrideForRole(Role role)
The
PermissionOverride relating to the specified Role . |
PermissionOverride |
getOverrideForUser(User user)
The
PermissionOverride relating to the specified User . |
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. |
java.util.List<PermissionOverride> |
getRolePermissionOverrides()
|
java.lang.String |
getTopic()
The topic set for this Channel.
|
java.util.List<PermissionOverride> |
getUserPermissionOverrides()
|
java.util.List<User> |
getUsers()
A List of all
Users that are in this Channel
For TextChannels , this returns all Users with the Permission.MESSAGE_READ Permission. |
java.lang.String getId()
java.lang.String getName()
java.lang.String getTopic()
Guild getGuild()
Guild
that this Channel is part of.Guild
that this Channel is part of.java.util.List<User> getUsers()
Users
that are in this Channel
For TextChannels
, this returns all Users with the Permission.MESSAGE_READ
Permission.
In VoiceChannels
, this returns all Users that joined that VoiceChannel.Users
that are in this Channel.int getPosition()
Guild
do not have to have continuous positionsboolean checkPermission(User user, Permission permission)
User
has the given Permission
in this Channeluser
- the User to check the Permission againstpermission
- the Permission to check forChannelManager getManager()
ChannelManager
for this Channel.
In the ChannelManager, you can modify the name, topic and position of this Channel.JDA getJDA()
JDA
instance of this ChannelPermissionOverride getOverrideForUser(User user)
PermissionOverride
relating to the specified User
.
If there is no PermissionOverride
for this Channel
relating to the provided User
, then this returns null
.user
- The User
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 getUserPermissionOverrides()
or getRolePermissionOverrides()
respectively.PermissionOverrides
for this Channel
.java.util.List<PermissionOverride> getUserPermissionOverrides()
PermissionOverrides
for Users
for this Channel
.java.util.List<PermissionOverride> getRolePermissionOverrides()
PermissionOverrides
for Roles
for this Channel
.PermissionOverrideManager createPermissionOverride(User user)
PermissionOverride
for a given User
.
For this to be successful, the logged in account has to have the MANAGE_PERMISSIONS Permission
user
- the User to create an Override forPermissionOverrideManager createPermissionOverride(Role role)
PermissionOverride
for a given Role
.
For this to be successful, the logged in account has to have the MANAGE_PERMISSIONS Permission
role
- the Role to create an Override for