Interface TextChannelManager
-
- All Superinterfaces:
AuditableRestAction<Void>
,BaseGuildMessageChannelManager<TextChannel,TextChannelManager>
,ChannelManager<TextChannel,TextChannelManager>
,ICategorizableChannelManager<TextChannel,TextChannelManager>
,IPermissionContainerManager<TextChannel,TextChannelManager>
,IPositionableChannelManager<TextChannel,TextChannelManager>
,Manager<TextChannelManager>
,RestAction<Void>
public interface TextChannelManager extends BaseGuildMessageChannelManager<TextChannel,TextChannelManager>
-
-
Field Summary
-
Fields inherited from interface net.dv8tion.jda.api.managers.channel.ChannelManager
ARCHIVED, AUTO_ARCHIVE_DURATION, BITRATE, INVITEABLE, LOCKED, NAME, NSFW, PARENT, PERMISSION, POSITION, REGION, SLOWMODE, TOPIC, TYPE, USERLIMIT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TextChannelManager
setSlowmode(int slowmode)
Sets the slowmode of the selectedTextChannel
.TextChannelManager
setType(ChannelType type)
Converts the selected channel to a differentChannelType
.-
Methods inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
reason
-
Methods inherited from interface net.dv8tion.jda.api.managers.channel.middleman.BaseGuildMessageChannelManager
setNSFW, setTopic
-
Methods inherited from interface net.dv8tion.jda.api.managers.channel.ChannelManager
getChannel, getGuild, reset, reset, setName
-
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.ICategorizableChannelManager
setParent, sync, sync
-
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.IPermissionContainerManager
clearOverridesAdded, clearOverridesRemoved, putMemberPermissionOverride, putMemberPermissionOverride, putPermissionOverride, putPermissionOverride, putRolePermissionOverride, putRolePermissionOverride, removePermissionOverride, removePermissionOverride
-
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.IPositionableChannelManager
setPosition
-
Methods inherited from interface net.dv8tion.jda.api.managers.Manager
deadline, reset, setCheck, timeout
-
Methods inherited from interface net.dv8tion.jda.api.requests.RestAction
addCheck, and, and, complete, complete, completeAfter, delay, delay, delay, delay, flatMap, flatMap, getCheck, getJDA, map, mapToResult, onErrorFlatMap, onErrorFlatMap, onErrorMap, onErrorMap, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
-
-
-
-
Method Detail
-
setSlowmode
@Nonnull @CheckReturnValue TextChannelManager setSlowmode(int slowmode)
Sets the slowmode of the selectedTextChannel
.
Provide0
to reset the slowmode of theTextChannel
A channel slowmode must not be negative nor greater than
TextChannel.MAX_SLOWMODE
!
This is only available toTextChannels
Note: Bots are unaffected by this.
HavingMESSAGE_MANAGE
orMANAGE_CHANNEL
permission also grants immunity to slowmode.- Parameters:
slowmode
- The new slowmode for the selectedTextChannel
- Returns:
- ChannelManager for chaining convenience
- Throws:
IllegalStateException
- If the selectedGuildChannel
's type is notTEXT
IllegalArgumentException
- If the provided slowmode is negative or greater thanTextChannel.MAX_SLOWMODE
-
setType
@Nonnull @CheckReturnValue TextChannelManager setType(@Nonnull ChannelType type)
Converts the selected channel to a differentChannelType
.
This can only be done in the follow situations:Current Channel Type New Channel Type ChannelType.NEWS
-> ChannelType.TEXT
ChannelType.TEXT
-> ChannelType.NEWS
- Parameters:
type
- The new not-nullChannelType
of the channel- Returns:
- ChannelManager for chaining convenience
- Throws:
IllegalArgumentException
- IfchannelType
is notChannelType.TEXT
orChannelType.NEWS
UnsupportedOperationException
- If this ChannelAction is not for aTextChannel
orNewsChannel
IllegalStateException
- IfchannelType
isChannelType.NEWS
and the guild doesn't have theNEWS
feature inGuild.getFeatures()
.- See Also:
Guild.getFeatures()
-
-