Add support for target-text-channels for Slash Commands
This commit is contained in:
parent
1e041083e1
commit
7bd2effa24
|
@ -328,6 +328,13 @@ public class DiscordClient extends ListenerAdapter {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!Arrays.asList(targetTextChannels).contains(event.getTextChannel().getId())) {
|
||||
MessageEmbed messageEmbed = CreateEmbeddedMessage("Sorry!",
|
||||
("This bot can only used in the specified chcannel."), EmbedMessageType.FAILURE).build();
|
||||
ReplyAndRemoveAfterSeconds(event, messageEmbed);
|
||||
return;
|
||||
}
|
||||
|
||||
String subcommand = event.getSubcommandName();
|
||||
OptionMapping mc_name_op = event.getOption("minecraft_username");
|
||||
String mc_name = null;
|
||||
|
|
Loading…
Reference in New Issue