Interface ISlowmodeChannel
- All Superinterfaces:
Channel,Comparable<GuildChannel>,Formattable,GuildChannel,IDetachableEntity,IMentionable,ISnowflake
- All Known Subinterfaces:
ForumChannel,MediaChannel,StageChannel,TextChannel,ThreadChannel,VoiceChannel
Channels which support slowmode.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe maximum duration of slowmode in secondsFields inherited from interface net.dv8tion.jda.api.entities.channel.Channel
MAX_NAME_LENGTHFields inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
JUMP_URL -
Method Summary
Modifier and TypeMethodDescriptionReturns theISlowmodeChannelManagerfor thisslow mode channel.intThe slowmode set for this channel.Methods inherited from interface net.dv8tion.jda.api.entities.channel.Channel
formatTo, getAsMention, getFlags, getJDA, getName, getTypeMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
delete, getGuild, getJumpUrl, getPermissionContainerMethods inherited from interface net.dv8tion.jda.api.entities.detached.IDetachableEntity
isDetachedMethods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Field Details
-
MAX_SLOWMODE
static final int MAX_SLOWMODEThe maximum duration of slowmode in seconds- See Also:
-
-
Method Details
-
getSlowmode
int getSlowmode()The slowmode set for this channel.
If slowmode is set, this returns anintbetween 1 and 21600.
Otherwise, if no slowmode is set, this returns0.Note bots are unaffected by this.
HavingMESSAGE_MANAGEorMANAGE_CHANNELpermission also grants immunity to slowmode.Special case
ForumChannelsuse this to limit how many posts a user can create. The client refers to this as the post slowmode.- Returns:
- The slowmode for this channel, between 1 and 21600, or
0if no slowmode is set.
-
getManager
Returns theISlowmodeChannelManagerfor thisslow mode channel.
With the provided ChannelManager, you can additionally modify theChannelField.SLOWMODEcompared to a guild channel'sChannelManager. You modify multiple fields in one request by chaining setters before callingRestAction.queue().- Specified by:
getManagerin interfaceGuildChannel- Returns:
- The
ISlowmodeChannelManagerof thisISlowmodeChannel - Throws:
InsufficientPermissionException- If the currently logged in account does not havePermission.MANAGE_CHANNELDetachedEntityException- If this entity isdetached- See Also:
-