diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/ChannelType.java b/src/main/java/net/dv8tion/jda/api/entities/channel/ChannelType.java index 6d1ff37d34..56d01dbaa8 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/channel/ChannelType.java +++ b/src/main/java/net/dv8tion/jda/api/entities/channel/ChannelType.java @@ -143,6 +143,7 @@ public boolean isMessage() { case TEXT: case VOICE: + case STAGE: case NEWS: case PRIVATE: case GROUP: diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/concrete/StageChannel.java b/src/main/java/net/dv8tion/jda/api/entities/channel/concrete/StageChannel.java index 58f1b8de20..d981754c91 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/channel/concrete/StageChannel.java +++ b/src/main/java/net/dv8tion/jda/api/entities/channel/concrete/StageChannel.java @@ -21,8 +21,11 @@ import net.dv8tion.jda.api.entities.GuildVoiceState; import net.dv8tion.jda.api.entities.Member; import net.dv8tion.jda.api.entities.StageInstance; +import net.dv8tion.jda.api.entities.channel.attribute.IAgeRestrictedChannel; +import net.dv8tion.jda.api.entities.channel.attribute.ISlowmodeChannel; +import net.dv8tion.jda.api.entities.channel.attribute.IWebhookContainer; import net.dv8tion.jda.api.entities.channel.middleman.AudioChannel; -import net.dv8tion.jda.api.entities.channel.middleman.GuildChannel; +import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel; import net.dv8tion.jda.api.entities.channel.middleman.StandardGuildChannel; import net.dv8tion.jda.api.exceptions.InsufficientPermissionException; import net.dv8tion.jda.api.managers.channel.concrete.StageChannelManager; @@ -42,8 +45,13 @@ * *
This is a specialized AudioChannel that can be used to host events with speakers and listeners.
*/
-public interface StageChannel extends GuildChannel, AudioChannel, StandardGuildChannel
+public interface StageChannel extends StandardGuildChannel, GuildMessageChannel, AudioChannel, IWebhookContainer, IAgeRestrictedChannel, ISlowmodeChannel
{
+ /**
+ * The maximum limit you can set with {@link StageChannelManager#setUserLimit(int)}. ({@value})
+ */
+ int MAX_USERLIMIT = 10000;
+
/**
* {@link StageInstance} attached to this stage channel.
*
diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/concrete/VoiceChannel.java b/src/main/java/net/dv8tion/jda/api/entities/channel/concrete/VoiceChannel.java
index 6614e738ba..7c18c463b5 100644
--- a/src/main/java/net/dv8tion/jda/api/entities/channel/concrete/VoiceChannel.java
+++ b/src/main/java/net/dv8tion/jda/api/entities/channel/concrete/VoiceChannel.java
@@ -18,6 +18,7 @@
import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.channel.attribute.IAgeRestrictedChannel;
+import net.dv8tion.jda.api.entities.channel.attribute.ISlowmodeChannel;
import net.dv8tion.jda.api.entities.channel.attribute.IWebhookContainer;
import net.dv8tion.jda.api.entities.channel.middleman.AudioChannel;
import net.dv8tion.jda.api.entities.channel.middleman.GuildChannel;
@@ -46,16 +47,12 @@
* @see JDA#getVoiceChannelsByName(String, boolean)
* @see JDA#getVoiceChannelById(long)
*/
-public interface VoiceChannel extends AudioChannel, StandardGuildChannel, GuildMessageChannel, IWebhookContainer, IAgeRestrictedChannel
+public interface VoiceChannel extends StandardGuildChannel, GuildMessageChannel, AudioChannel, IWebhookContainer, IAgeRestrictedChannel, ISlowmodeChannel
{
/**
- * The maximum amount of {@link net.dv8tion.jda.api.entities.Member Members} that can be in this
- * {@link VoiceChannel VoiceChannel} at once.
- *
0 - No limit
- *
- * @return The maximum amount of members allowed in this channel at once.
+ * The maximum limit you can set with {@link VoiceChannelManager#setUserLimit(int)}. ({@value})
*/
- int getUserLimit();
+ int MAX_USERLIMIT = 99;
@Nonnull
@Override
diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/middleman/AudioChannel.java b/src/main/java/net/dv8tion/jda/api/entities/channel/middleman/AudioChannel.java
index 3e3658746f..196059bb7e 100644
--- a/src/main/java/net/dv8tion/jda/api/entities/channel/middleman/AudioChannel.java
+++ b/src/main/java/net/dv8tion/jda/api/entities/channel/middleman/AudioChannel.java
@@ -62,6 +62,16 @@ public interface AudioChannel extends StandardGuildChannel
*/
int getBitrate();
+ /**
+ * The maximum amount of {@link net.dv8tion.jda.api.entities.Member Members} that be in an audio connection within this channel concurrently.
+ *
Returns 0 if there is no limit.
+ *
+ *
Moderators with the {@link net.dv8tion.jda.api.Permission#VOICE_MOVE_OTHERS VOICE_MOVE_OTHERS} permission can bypass this limit.
+ *
+ * @return The maximum connections allowed in this channel concurrently
+ */
+ int getUserLimit();
+
/**
* The {@link Region} of this channel.
*
This will return {@link Region#AUTOMATIC} if the region of this channel is set to Automatic.
diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/unions/AudioChannelUnion.java b/src/main/java/net/dv8tion/jda/api/entities/channel/unions/AudioChannelUnion.java
index bef6ccc175..274fb98f21 100644
--- a/src/main/java/net/dv8tion/jda/api/entities/channel/unions/AudioChannelUnion.java
+++ b/src/main/java/net/dv8tion/jda/api/entities/channel/unions/AudioChannelUnion.java
@@ -20,6 +20,7 @@
import net.dv8tion.jda.api.entities.channel.concrete.StageChannel;
import net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel;
import net.dv8tion.jda.api.entities.channel.middleman.AudioChannel;
+import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel;
import javax.annotation.Nonnull;
@@ -79,4 +80,23 @@ public interface AudioChannelUnion extends AudioChannel
*/
@Nonnull
StageChannel asStageChannel();
+
+ /**
+ * Casts this union to a {@link GuildMessageChannel}.
+ *
This method exists for developer discoverability.
+ *
+ *
Note: This is effectively equivalent to using the cast operator: + *
{@code + * //These are the same! + * GuildMessageChannel channel = union.asGuildMessageChannel(); + * GuildMessageChannel channel2 = (GuildMessageChannel) union; + * }+ * + * @throws IllegalStateException + * If the channel represented by this union is not actually a {@link GuildMessageChannel}. + * + * @return The channel as a {@link GuildMessageChannel} + */ + @Nonnull + GuildMessageChannel asGuildMessageChannel(); } diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/unions/GuildMessageChannelUnion.java b/src/main/java/net/dv8tion/jda/api/entities/channel/unions/GuildMessageChannelUnion.java index 3dbb14503c..e3c7317182 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/channel/unions/GuildMessageChannelUnion.java +++ b/src/main/java/net/dv8tion/jda/api/entities/channel/unions/GuildMessageChannelUnion.java @@ -18,10 +18,8 @@ import net.dv8tion.jda.api.entities.channel.ChannelType; import net.dv8tion.jda.api.entities.channel.attribute.IThreadContainer; -import net.dv8tion.jda.api.entities.channel.concrete.NewsChannel; -import net.dv8tion.jda.api.entities.channel.concrete.TextChannel; -import net.dv8tion.jda.api.entities.channel.concrete.ThreadChannel; -import net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel; +import net.dv8tion.jda.api.entities.channel.concrete.*; +import net.dv8tion.jda.api.entities.channel.middleman.AudioChannel; import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel; import net.dv8tion.jda.api.entities.channel.middleman.StandardGuildChannel; import net.dv8tion.jda.api.entities.channel.middleman.StandardGuildMessageChannel; @@ -38,6 +36,7 @@ *
+ * //These are the same!
+ * StageChannel channel = union.asStageChannel();
+ * StageChannel channel2 = (StageChannel) union;
+ *
+ *
+ * You can use {@link #getType()} to see if the channel is of type {@link ChannelType#STAGE} to validate
+ * whether you can call this method in addition to normal instanceof checks: channel instanceof StageChannel
+ *
+ * @throws IllegalStateException
+ * If the channel represented by this union is not actually a {@link StageChannel}.
+ *
+ * @return The channel as a {@link StageChannel}
+ */
+ @Nonnull
+ StageChannel asStageChannel();
+
/**
* Casts this union to a {@link net.dv8tion.jda.api.entities.channel.attribute.IThreadContainer}.
* This method exists for developer discoverability.
@@ -149,6 +170,7 @@ public interface GuildMessageChannelUnion extends GuildMessageChannel
*
* @return The channel as a {@link net.dv8tion.jda.api.entities.channel.attribute.IThreadContainer}
*/
+ @Nonnull
IThreadContainer asThreadContainer();
/**
@@ -187,4 +209,25 @@ public interface GuildMessageChannelUnion extends GuildMessageChannel
*/
@Nonnull
StandardGuildMessageChannel asStandardGuildMessageChannel();
+
+ /**
+ * Casts this union to a {@link AudioChannel}.
+ * This method exists for developer discoverability.
+ *
+ * Note: This is effectively equivalent to using the cast operator:
+ *
+ * //These are the same!
+ * AudioChannel channel = union.asAudioChannel();
+ * AudioChannel channel2 = (AudioChannel) union;
+ *
+ *
+ * You can use channel instanceof AudioChannel
to validate whether you can call this method.
+ *
+ * @throws IllegalStateException
+ * If the channel represented by this union is not actually a {@link AudioChannel}.
+ *
+ * @return The channel as a {@link AudioChannel}
+ */
+ @Nonnull
+ AudioChannel asAudioChannel();
}
diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/unions/IWebhookContainerUnion.java b/src/main/java/net/dv8tion/jda/api/entities/channel/unions/IWebhookContainerUnion.java
index 7715e494c1..2a6e92b6e9 100644
--- a/src/main/java/net/dv8tion/jda/api/entities/channel/unions/IWebhookContainerUnion.java
+++ b/src/main/java/net/dv8tion/jda/api/entities/channel/unions/IWebhookContainerUnion.java
@@ -19,10 +19,8 @@
import net.dv8tion.jda.api.entities.channel.ChannelType;
import net.dv8tion.jda.api.entities.channel.attribute.IThreadContainer;
import net.dv8tion.jda.api.entities.channel.attribute.IWebhookContainer;
-import net.dv8tion.jda.api.entities.channel.concrete.ForumChannel;
-import net.dv8tion.jda.api.entities.channel.concrete.NewsChannel;
-import net.dv8tion.jda.api.entities.channel.concrete.TextChannel;
-import net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel;
+import net.dv8tion.jda.api.entities.channel.concrete.*;
+import net.dv8tion.jda.api.entities.channel.middleman.AudioChannel;
import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel;
import net.dv8tion.jda.api.entities.channel.middleman.StandardGuildChannel;
import net.dv8tion.jda.api.entities.channel.middleman.StandardGuildMessageChannel;
@@ -38,6 +36,8 @@
*
+ * //These are the same!
+ * StageChannel channel = union.asStageChannel();
+ * StageChannel channel2 = (StageChannel) union;
+ *
+ *
+ * You can use {@link #getType()} to see if the channel is of type {@link ChannelType#STAGE} to validate
+ * whether you can call this method in addition to normal instanceof checks: channel instanceof StageChannel
+ *
+ * @throws IllegalStateException
+ * If the channel represented by this union is not actually a {@link StageChannel}.
+ *
+ * @return The channel as a {@link StageChannel}
+ */
+ @Nonnull
+ StageChannel asStageChannel();
+
/**
* Casts this union to a {@link GuildMessageChannel}.
*
+ * //These are the same!
+ * AudioChannel channel = union.asAudioChannel();
+ * AudioChannel channel2 = (AudioChannel) union;
+ *
+ *
+ * You can use channel instanceof AudioChannel
to validate whether you can call this method.
+ *
+ * @throws IllegalStateException
+ * If the channel represented by this union is not actually a {@link AudioChannel}.
+ *
+ * @return The channel as a {@link AudioChannel}
+ */
+ @Nonnull
+ AudioChannel asAudioChannel();
}
diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/unions/MessageChannelUnion.java b/src/main/java/net/dv8tion/jda/api/entities/channel/unions/MessageChannelUnion.java
index faa2a08830..d559b038c8 100644
--- a/src/main/java/net/dv8tion/jda/api/entities/channel/unions/MessageChannelUnion.java
+++ b/src/main/java/net/dv8tion/jda/api/entities/channel/unions/MessageChannelUnion.java
@@ -19,6 +19,7 @@
import net.dv8tion.jda.api.entities.channel.ChannelType;
import net.dv8tion.jda.api.entities.channel.attribute.IThreadContainer;
import net.dv8tion.jda.api.entities.channel.concrete.*;
+import net.dv8tion.jda.api.entities.channel.middleman.AudioChannel;
import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel;
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel;
@@ -34,6 +35,7 @@
*
+ * //These are the same!
+ * StageChannel channel = union.asStageChannel();
+ * StageChannel channel2 = (StageChannel) union;
+ *
+ *
+ * You can use {@link #getType()} to see if the channel is of type {@link ChannelType#STAGE} to validate
+ * whether you can call this method in addition to normal instanceof checks: channel instanceof StageChannel
+ *
+ * @throws IllegalStateException
+ * If the channel represented by this union is not actually a {@link StageChannel}.
+ *
+ * @return The channel as a {@link StageChannel}
+ */
+ @Nonnull
+ StageChannel asStageChannel();
+
/**
* Casts this union to a {@link net.dv8tion.jda.api.entities.channel.attribute.IThreadContainer}.
* This method exists for developer discoverability.
@@ -197,4 +221,25 @@ public interface MessageChannelUnion extends MessageChannel
*/
@Nonnull
GuildMessageChannel asGuildMessageChannel();
+
+ /**
+ * Casts this union to a {@link AudioChannel}.
+ * This method exists for developer discoverability.
+ *
+ * Note: This is effectively equivalent to using the cast operator:
+ *
+ * //These are the same!
+ * AudioChannel channel = union.asAudioChannel();
+ * AudioChannel channel2 = (AudioChannel) union;
+ *
+ *
+ * You can use channel instanceof AudioChannel
to validate whether you can call this method.
+ *
+ * @throws IllegalStateException
+ * If the channel represented by this union is not actually a {@link AudioChannel}.
+ *
+ * @return The channel as a {@link AudioChannel}
+ */
+ @Nonnull
+ AudioChannel asAudioChannel();
}
diff --git a/src/main/java/net/dv8tion/jda/api/managers/channel/concrete/StageChannelManager.java b/src/main/java/net/dv8tion/jda/api/managers/channel/concrete/StageChannelManager.java
index 23a5c3c28e..ab279c69b3 100644
--- a/src/main/java/net/dv8tion/jda/api/managers/channel/concrete/StageChannelManager.java
+++ b/src/main/java/net/dv8tion/jda/api/managers/channel/concrete/StageChannelManager.java
@@ -17,6 +17,8 @@
package net.dv8tion.jda.api.managers.channel.concrete;
import net.dv8tion.jda.api.entities.channel.concrete.StageChannel;
+import net.dv8tion.jda.api.managers.channel.attribute.IAgeRestrictedChannelManager;
+import net.dv8tion.jda.api.managers.channel.attribute.ISlowmodeChannelManager;
import net.dv8tion.jda.api.managers.channel.middleman.AudioChannelManager;
import net.dv8tion.jda.api.managers.channel.middleman.StandardGuildChannelManager;
@@ -32,6 +34,8 @@
*/
public interface StageChannelManager extends
AudioChannelManagerA channel user-limit must not be negative nor greater than {@code 99}!
- * A channel bitrate must not be less than {@code 8000} nor greater than {@link Guild#getMaxBitrate()}!
- * A channel user-limit must not be negative nor greater than {@value VoiceChannel#MAX_USERLIMIT} for {@link VoiceChannel}
+ * and not greater than {@value StageChannel#MAX_USERLIMIT} for {@link StageChannel}!
+ *
This is only available to {@link VoiceChannel VoiceChannels}
- *
- * @param userLimit
- * The new user-limit for the selected {@link VoiceChannel VoiceChannel}
- *
- * @throws IllegalStateException
- * If the selected {@link GuildChannel GuildChannel}'s type is not {@link ChannelType#VOICE VOICE}
- * @throws IllegalArgumentException
- * If the provided user-limit is negative or greater than {@code 99}
- *
- * @return ChannelManager for chaining convenience
- */
- @Nonnull
- @CheckReturnValue
- VoiceChannelManager setUserLimit(int userLimit);
}
diff --git a/src/main/java/net/dv8tion/jda/api/managers/channel/middleman/AudioChannelManager.java b/src/main/java/net/dv8tion/jda/api/managers/channel/middleman/AudioChannelManager.java
index 351294f54d..dd4887b112 100644
--- a/src/main/java/net/dv8tion/jda/api/managers/channel/middleman/AudioChannelManager.java
+++ b/src/main/java/net/dv8tion/jda/api/managers/channel/middleman/AudioChannelManager.java
@@ -18,7 +18,7 @@
import net.dv8tion.jda.api.Region;
import net.dv8tion.jda.api.entities.Guild;
-import net.dv8tion.jda.api.entities.channel.ChannelType;
+import net.dv8tion.jda.api.entities.channel.concrete.StageChannel;
import net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel;
import net.dv8tion.jda.api.entities.channel.middleman.AudioChannel;
@@ -29,17 +29,17 @@
public interface AudioChannelManager
The default value is {@code 64000}
*
*
This is only available to {@link VoiceChannel VoiceChannels}
+ *
This is only available to {@link AudioChannel AudioChannels}
*
* @param bitrate
- * The new bitrate for the selected {@link VoiceChannel VoiceChannel}
+ * The new bitrate for the selected {@link AudioChannel}
*
* @throws IllegalStateException
- * If the selected {@link net.dv8tion.jda.api.entities.channel.middleman.GuildChannel GuildChannel}'s type is not {@link ChannelType#VOICE VOICE}
+ * If the selected channel is not an {@link AudioChannel}
* @throws IllegalArgumentException
* If the provided bitrate is less than 8000 or greater than {@link Guild#getMaxBitrate()}.
*
@@ -52,7 +52,29 @@ public interface AudioChannelManager
Provide {@code 0} to reset the user-limit of the {@link AudioChannel}
+ *
+ *
This is only available to {@link AudioChannel AudioChannels}
+ *
+ * @param userLimit
+ * The new user-limit for the selected {@link AudioChannel}
+ *
+ * @throws IllegalStateException
+ * If the selected channel is not an {@link AudioChannel}
+ * @throws IllegalArgumentException
+ * If the provided user-limit is negative or greater than the permitted maximum
+ *
+ * @return ChannelManager for chaining convenience
+ */
+ @Nonnull
+ @CheckReturnValue
+ M setUserLimit(int userLimit);
+
+ /**
+ * Sets the {@link Region Region} of the selected {@link AudioChannel}.
*
The default value is {@link Region#AUTOMATIC}
*
* Possible values are:
@@ -72,14 +94,16 @@ public interface AudioChannelManager
This is only available to {@link VoiceChannel VoiceChannels}!
+ *
This is only available to {@link AudioChannel AudioChannels}!
*
* @param region
* The new {@link Region Region}
+ *
* @throws IllegalStateException
- * If the selected {@link net.dv8tion.jda.api.entities.channel.middleman.GuildChannel GuildChannel}'s type is not {@link ChannelType#VOICE VOICE}
+ * If the selected channel is not an {@link AudioChannel}
* @throws IllegalArgumentException
* If the provided Region is not in the list of usable values
+ *
* @return ChannelManager for chaining convenience
*/
@Nonnull
diff --git a/src/main/java/net/dv8tion/jda/api/requests/restaction/ChannelAction.java b/src/main/java/net/dv8tion/jda/api/requests/restaction/ChannelAction.java
index eea0519b44..86d7504aa5 100644
--- a/src/main/java/net/dv8tion/jda/api/requests/restaction/ChannelAction.java
+++ b/src/main/java/net/dv8tion/jda/api/requests/restaction/ChannelAction.java
@@ -27,8 +27,11 @@
import net.dv8tion.jda.api.entities.channel.attribute.ISlowmodeChannel;
import net.dv8tion.jda.api.entities.channel.concrete.Category;
import net.dv8tion.jda.api.entities.channel.concrete.ForumChannel;
+import net.dv8tion.jda.api.entities.channel.concrete.StageChannel;
+import net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel;
import net.dv8tion.jda.api.entities.channel.forums.BaseForumTag;
import net.dv8tion.jda.api.entities.channel.forums.ForumTagData;
+import net.dv8tion.jda.api.entities.channel.middleman.AudioChannel;
import net.dv8tion.jda.api.entities.channel.middleman.GuildChannel;
import net.dv8tion.jda.api.entities.channel.middleman.StandardGuildMessageChannel;
import net.dv8tion.jda.api.entities.emoji.Emoji;
@@ -585,15 +588,20 @@ default ChannelAction
The limit maximum varies by type.
+ *
+ *
*
* @param userlimit
- * The userlimit for the new VoiceChannel or {@code null}/{@code 0} to use no limit,
+ * The userlimit for the new AudioChannel or {@code null}/{@code 0} to use no limit
*
* @throws UnsupportedOperationException
- * If this ChannelAction is not for a VoiceChannel
+ * If this ChannelAction is not for a AudioChannel
* @throws IllegalArgumentException
- * If the provided userlimit is negative or above {@code 99}
+ * If the provided userlimit is negative or above the permitted limit
*
* @return The current ChannelAction, for chaining convenience
*/
diff --git a/src/main/java/net/dv8tion/jda/internal/entities/EntityBuilder.java b/src/main/java/net/dv8tion/jda/internal/entities/EntityBuilder.java
index b21882ceca..dee8de93e5 100644
--- a/src/main/java/net/dv8tion/jda/internal/entities/EntityBuilder.java
+++ b/src/main/java/net/dv8tion/jda/internal/entities/EntityBuilder.java
@@ -1199,7 +1199,9 @@ public VoiceChannel createVoiceChannel(GuildImpl guild, DataObject json, long gu
.setUserLimit(json.getInt("user_limit"))
.setNSFW(json.getBoolean("nsfw"))
.setBitrate(json.getInt("bitrate"))
- .setRegion(json.getString("rtc_region", null));
+ .setRegion(json.getString("rtc_region", null))
+// .setDefaultThreadSlowmode(json.getInt("default_thread_rate_limit_per_user", 0))
+ .setSlowmode(json.getInt("rate_limit_per_user", 0));
createOverridesPass(channel, json.getArray("permission_overwrites"));
if (playbackCache)
@@ -1236,10 +1238,15 @@ public StageChannel createStageChannel(GuildImpl guild, DataObject json, long gu
channel
.setParentCategory(json.getLong("parent_id", 0))
+ .setLatestMessageIdLong(json.getLong("last_message_id", 0))
.setName(json.getString("name"))
.setPosition(json.getInt("position"))
.setBitrate(json.getInt("bitrate"))
- .setRegion(json.getString("rtc_region", null));
+ .setUserLimit(json.getInt("user_limit", 0))
+ .setNSFW(json.getBoolean("nsfw"))
+ .setRegion(json.getString("rtc_region", null))
+// .setDefaultThreadSlowmode(json.getInt("default_thread_rate_limit_per_user", 0))
+ .setSlowmode(json.getInt("rate_limit_per_user", 0));
createOverridesPass(channel, json.getArray("permission_overwrites"));
if (playbackCache)
diff --git a/src/main/java/net/dv8tion/jda/internal/entities/channel/concrete/StageChannelImpl.java b/src/main/java/net/dv8tion/jda/internal/entities/channel/concrete/StageChannelImpl.java
index 6d8f1cb202..9e6054820a 100644
--- a/src/main/java/net/dv8tion/jda/internal/entities/channel/concrete/StageChannelImpl.java
+++ b/src/main/java/net/dv8tion/jda/internal/entities/channel/concrete/StageChannelImpl.java
@@ -35,7 +35,11 @@
import net.dv8tion.jda.api.utils.data.DataObject;
import net.dv8tion.jda.internal.entities.GuildImpl;
import net.dv8tion.jda.internal.entities.channel.middleman.AbstractStandardGuildChannelImpl;
+import net.dv8tion.jda.internal.entities.channel.mixin.attribute.IAgeRestrictedChannelMixin;
+import net.dv8tion.jda.internal.entities.channel.mixin.attribute.ISlowmodeChannelMixin;
+import net.dv8tion.jda.internal.entities.channel.mixin.attribute.IWebhookContainerMixin;
import net.dv8tion.jda.internal.entities.channel.mixin.middleman.AudioChannelMixin;
+import net.dv8tion.jda.internal.entities.channel.mixin.middleman.GuildMessageChannelMixin;
import net.dv8tion.jda.internal.managers.channel.concrete.StageChannelManagerImpl;
import net.dv8tion.jda.internal.requests.RestActionImpl;
import net.dv8tion.jda.internal.requests.Route;
@@ -52,13 +56,21 @@
public class StageChannelImpl extends AbstractStandardGuildChannelImpl