Update JDA

This commit is contained in:
Len committed 2022-09-09 15:31:14 +02:00
1 parent 3bb4fa8b0f
commit d371b44a66
7 files changed
+10 -10

No files matched your search

@@ -16,7 +16,7 @@ public class OptionMappingParsing {
public static GuildMessageChannel getGuildChannel(String optionName, SlashCommandInteractionEvent event, String commandName) {
OptionMapping optionMappingChannel = event.getInteraction().getOption(optionName);
GuildMessageChannel messageChannel = optionMappingChannel == null ? null : optionMappingChannel.getAsMessageChannel();
GuildMessageChannel messageChannel = optionMappingChannel == null ? null : optionMappingChannel.getAsChannel().asGuildMessageChannel();
if (messageChannel == null)
event.replyEmbeds(Util.invalidCommand(commandName, "Not a valid text channel or didn't give input for " + optionName, event.getInteraction())).setEphemeral(true).queue();
return messageChannel;