fix: all null pointers in disconnect listeners (there was so much)

i didn't even know how the bot even functioned for the whole 5 months without me noticing
This commit is contained in:
ChomeNS
2025-04-10 07:58:39 +07:00
parent 76eadb1472
commit 70bf2574cf
6 changed files with 13 additions and 28 deletions

View File

@@ -387,7 +387,11 @@ public class Bot extends SessionAdapter {
}
for (final SessionListener listener : listeners) {
listener.disconnected(disconnectedEvent);
try {
listener.disconnected(disconnectedEvent);
} catch (final Exception e) {
logger.error(e);
}
}
}