Interface ISlowmodeChannel
- All Superinterfaces:
Channel
,Comparable<GuildChannel>
,Formattable
,GuildChannel
,IMentionable
,ISnowflake
- All Known Subinterfaces:
ForumChannel
,MediaChannel
,StageChannel
,TextChannel
,ThreadChannel
,VoiceChannel
Channels which support slowmode.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The maximum duration of slowmode in secondsFields inherited from interface net.dv8tion.jda.api.entities.channel.Channel
MAX_NAME_LENGTH
Fields inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
JUMP_URL
-
Method Summary
Modifier and TypeMethodDescriptionReturns theISlowmodeChannelManager
for thisslow mode channel
.int
The slowmode set for this channel.Methods inherited from interface net.dv8tion.jda.api.entities.channel.Channel
formatTo, getAsMention, getFlags, getJDA, getName, getType
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
delete, getGuild, getJumpUrl, getPermissionContainer
Methods 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 anint
between 1 and 21600.
Otherwise, if no slowmode is set, this returns0
.Note bots are unaffected by this.
HavingMESSAGE_MANAGE
orMANAGE_CHANNEL
permission also grants immunity to slowmode.Special case
ForumChannels
use 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
0
if no slowmode is set.
-
getManager
Returns theISlowmodeChannelManager
for thisslow mode channel
.
With the provided ChannelManager, you can additionally modify theChannelField.SLOWMODE
compared to a guild channel'sChannelManager
. You modify multiple fields in one request by chaining setters before callingRestAction.queue()
.- Specified by:
getManager
in interfaceGuildChannel
- Returns:
- The
ISlowmodeChannelManager
of thisISlowmodeChannel
- Throws:
InsufficientPermissionException
- If the currently logged in account does not havePermission.MANAGE_CHANNEL
- See Also:
-