Package net.dv8tion.jda.api.entities
Interface GuildChannel
-
- All Superinterfaces:
Channel
,Comparable<GuildChannel>
,Formattable
,IMentionable
,ISnowflake
- All Known Subinterfaces:
AudioChannel
,BaseGuildMessageChannel
,Category
,GuildMessageChannel
,ICategorizableChannel
,ICopyableChannel
,IInviteContainer
,IMemberContainer
,IPermissionContainer
,IPositionableChannel
,IThreadContainer
,NewsChannel
,StageChannel
,TextChannel
,ThreadChannel
,VoiceChannel
public interface GuildChannel extends Channel, Comparable<GuildChannel>
Represents aGuild
channel.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AuditableRestAction<Void>
delete()
TODO-v5: this override might not be needed anymore if we remove AuditableRestAction and instead place auditable hooks onto RestAction itself.Guild
getGuild()
Returns theGuild
that this GuildChannel is part of.ChannelManager<?,?>
getManager()
Returns theChannelManager
for this GuildChannel.IPermissionContainer
getPermissionContainer()
-
Methods inherited from interface net.dv8tion.jda.api.entities.Channel
formatTo, getAsMention, getJDA, getName, getType
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
-
-
-
Method Detail
-
getGuild
@Nonnull Guild getGuild()
Returns theGuild
that this GuildChannel is part of.- Returns:
- Never-null
Guild
that this GuildChannel is part of.
-
getManager
@Nonnull ChannelManager<?,?> getManager()
Returns theChannelManager
for this GuildChannel.
In the ChannelManager, you can modify the name, topic and position of this GuildChannel. You modify multiple fields in one request by chaining setters before callingRestAction.queue()
.This is a lazy idempotent getter. The manager is retained after the first call. This getter is not thread-safe and would require guards by the user.
- Returns:
- The ChannelManager of this GuildChannel
- Throws:
InsufficientPermissionException
- If the currently logged in account does not havePermission.MANAGE_CHANNEL
-
delete
@Nonnull @CheckReturnValue AuditableRestAction<Void> delete()
TODO-v5: this override might not be needed anymore if we remove AuditableRestAction and instead place auditable hooks onto RestAction itself. Deletes this GuildChannel.Possible ErrorResponses include:
UNKNOWN_CHANNEL
If this channel was already deletedMISSING_PERMISSIONS
The send request was attempted after the account lostPermission.MANAGE_CHANNEL
in the channel.MISSING_ACCESS
If we were removed from the Guild
- Specified by:
delete
in interfaceChannel
- Returns:
AuditableRestAction
- Throws:
InsufficientPermissionException
- if the currently logged in account doesn't haveMANAGE_CHANNEL
for the channel.
-
getPermissionContainer
IPermissionContainer getPermissionContainer()
-
-