Skip to content

Commit 177421f

Browse files
removed unused import && added support for mod-commands in voice channels
1 parent cbd558f commit 177421f

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

src/main/java/net/javadiscord/javabot/systems/help/HelpChannelInteractionManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public void handleButton(@NotNull ButtonInteractionEvent event, @NotNull Button
187187
) {
188188
if (action.equals("done")) {
189189
event.getMessage().delete().queue();
190-
if (event.getUser().equals(owner)) {// If the owner is unreserving their own channel, handle it separately.
190+
if (event.getUser().equals(owner)) { // If the owner is unreserving their own channel, handle it separately.
191191
channelManager.unreserveChannelByOwner(channel, owner, null, event);
192192
} else {
193193
channelManager.unreserveChannel(channel).queue();

src/main/java/net/javadiscord/javabot/systems/moderation/ModerateCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void execute(@NotNull SlashCommandInteractionEvent event) {
3030
Responses.replyStaffOnly(event, event.getGuild()).queue();
3131
return;
3232
}
33-
if (event.getChannelType() != ChannelType.TEXT && !event.getChannelType().isThread()) {
33+
if (event.getChannelType() != ChannelType.TEXT && event.getChannelType() != ChannelType.VOICE && !event.getChannelType().isThread()) {
3434
Responses.error(event, "This command can only be performed in a server text channel or thread.").queue();
3535
return;
3636
}

src/main/java/net/javadiscord/javabot/systems/moderation/timeout/AddTimeoutSubcommand.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package net.javadiscord.javabot.systems.moderation.timeout;
22

33

4-
import net.dv8tion.jda.api.entities.Channel;
54
import net.dv8tion.jda.api.entities.Member;
65
import net.dv8tion.jda.api.entities.MessageChannel;
76
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;

0 commit comments

Comments
 (0)