Fix VoiceChannel not being mapped in DiscordAPIImpl#getMessageChannel

This commit is contained in:
Vankka 2024-06-22 21:51:57 +03:00
parent 35efe6d85d
commit c348e51145
No known key found for this signature in database
GPG Key ID: 62E48025ED4E7EBB

View File

@ -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());
}