Skip to content

Commit c4009db

Browse files
Added check for slowmode
1 parent d30e168 commit c4009db

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/net/javadiscord/javabot/systems/user_commands/MoveConversationCommand.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ public void execute(@NotNull SlashCommandInteractionEvent event) {
5656
Responses.warning(event, "Invalid Channel", "You cannot move the conversation to the same channel!").queue();
5757
return;
5858
}
59+
if (channelMapping.getAsChannel().getType() == ChannelType.TEXT && channelMapping.getAsChannel().asTextChannel().getSlowmode() > 0) {
60+
Responses.warning(event, "Invalid Channel", "You cannot move the conversation to a channel that has slowmode enabled!").queue();
61+
return;
62+
}
5963
if (isInvalidChannel(event.getMember(), channel)) {
6064
Responses.warning(event, "Invalid Channel", "You're not allowed to move the conversation to %s", channel.getAsMention()).queue();
6165
return;

0 commit comments

Comments
 (0)