Package net.dv8tion.jda.api.entities
Interface Channel
-
- All Superinterfaces:
Formattable,IMentionable,ISnowflake
- All Known Subinterfaces:
AudioChannel,BaseGuildMessageChannel,Category,GuildChannel,GuildMessageChannel,ICategorizableChannel,ICopyableChannel,IInviteContainer,IMemberContainer,IPermissionContainer,IPositionableChannel,IThreadContainer,MessageChannel,NewsChannel,PrivateChannel,StageChannel,TextChannel,ThreadChannel,VoiceChannel
public interface Channel extends IMentionable
Abstract Channel interface for allChannelTypes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description RestAction<Void>delete()TODO-v5: Revisit these docs Deletes this Channel.default voidformatTo(Formatter formatter, int flags, int width, int precision)default StringgetAsMention()Retrieve a Mention for this Entity.JDAgetJDA()Returns theJDAinstance of this channelStringgetName()The human readable name of this channel.ChannelTypegetType()TheChannelTypefor this channel-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
-
-
-
Method Detail
-
getName
@Nonnull String getName()
The human readable name of this channel.- Returns:
- The name of this channel
-
getType
@Nonnull ChannelType getType()
TheChannelTypefor this channel- Returns:
- The channel type
-
getJDA
@Nonnull JDA getJDA()
Returns theJDAinstance of this channel- Returns:
- the corresponding JDA instance
-
delete
@Nonnull @CheckReturnValue RestAction<Void> delete()
TODO-v5: Revisit these docs Deletes this Channel.Possible ErrorResponses include:
UNKNOWN_CHANNEL
If this channel was already deleted
- Returns:
RestAction
-
getAsMention
default String getAsMention()
Description copied from interface:IMentionableRetrieve a Mention for this Entity. For the publicRole(@everyone), this will return the literal string"@everyone".- Specified by:
getAsMentionin interfaceIMentionable- Returns:
- A resolvable mention.
-
formatTo
default void formatTo(Formatter formatter, int flags, int width, int precision)
- Specified by:
formatToin interfaceFormattable- Specified by:
formatToin interfaceIMentionable
-
-