From c348e51145518e665b4cc33ffd128fde8708f86b Mon Sep 17 00:00:00 2001 From: Vankka Date: Sat, 22 Jun 2024 21:51:57 +0300 Subject: [PATCH] Fix VoiceChannel not being mapped in DiscordAPIImpl#getMessageChannel --- .../java/com/discordsrv/common/discord/api/DiscordAPIImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/src/main/java/com/discordsrv/common/discord/api/DiscordAPIImpl.java b/common/src/main/java/com/discordsrv/common/discord/api/DiscordAPIImpl.java index adec1314..accb8a62 100644 --- a/common/src/main/java/com/discordsrv/common/discord/api/DiscordAPIImpl.java +++ b/common/src/main/java/com/discordsrv/common/discord/api/DiscordAPIImpl.java @@ -159,6 +159,8 @@ public class DiscordAPIImpl implements DiscordAPI { return getDirectMessageChannel((PrivateChannel) jda); } else if (jda instanceof NewsChannel) { return getNewsChannel((NewsChannel) jda); + } else if (jda instanceof VoiceChannel) { + return getVoiceChannel((VoiceChannel) jda); } else { throw new IllegalArgumentException("Unmappable MessageChannel type: " + jda.getClass().getName()); }