Open Phoenix-Starlight opened 9 months ago
If your message is saying something like this: [19:48:55.885 INFO] KCommando -> The skipped methods at dev.tiertests.commands.cooldown.ManageCooldownCmd: hashCode,getClass,notify,notifyAll (They don't have any appropriate annotation)
It is because those methods are inherited from the java Object class, and the annotation is just seeing those too.
The simple fix would be to in the KInitalizer class add this check
if (annotationType == null) {
if (KCommando.verbose) {
if (!(method.getDeclaringClass() == Object.class)) {
skippedMethods.add(method.getName());
}
}
continue;
}
Describe the bug Verbose logging fires incorrectly and logs messages about methods not being annotated, even though they are annotated.
To Reproduce Steps to reproduce the behavior:
HandleSlash
The skipped methods at bot_test.commands.slash.Ping: (They don't have any appropriate annotation)
Expected behavior It shouldn't log this message unless it is wrong. (Not annotated)
Versions Your current JDA, Reflections8 and KCommando versions. Javacord 3.8.0 KCommando 5.1.0 Reflections8: N/A