fix wrong logic

This commit is contained in:
tueem 2024-11-01 15:30:50 +01:00
parent 6bd6021b86
commit 3778f45cf3
No known key found for this signature in database
GPG Key ID: 819A0F7C36B9CF07

@ -30,8 +30,8 @@ public final class ReflectionUtil {
if (!isAnnotationPresent(method, SlashCommand.class))
throw new RuntimeException(method.getName() + ": Missing ApplicationCommand Annotation on either Class or Method");
if (!(method.isAnnotationPresent(SubCommand.class) &&
isAnnotationPresent(method, SlashCommand.class))) {
if ((method.isAnnotationPresent(SubCommand.class) &&
!isAnnotationPresent(method, SlashCommand.class))) {
throw new RuntimeException(method.getName() + ": Missing ApplicationCommand Annotation on either Method or Class");
}
}