File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
BotCommands-core/src/main/kotlin/io/github/freya022/botcommands/internal/core Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ internal class ReadyListener {
2525 @BEventListener(priority = Int .MAX_VALUE , mode = RunMode .BLOCKING )
2626 internal suspend fun onConnectEvent (event : StatusChangeEvent , context : BContext ) {
2727 // At this point, JDA should be usable
28- if (! connected && event.newStatus == JDA .Status .CONNECTING_TO_WEBSOCKET ) {
28+ // Use >= because any event beyond this point is a valid JDA instance
29+ if (! connected && event.newStatus >= JDA .Status .CONNECTING_TO_WEBSOCKET ) {
2930 lock.withLock {
3031 if (connected) return
3132 connected = true
@@ -50,4 +51,4 @@ internal class ReadyListener {
5051
5152 context.eventDispatcher.dispatchEvent(FirstGuildReadyEvent (context, event))
5253 }
53- }
54+ }
You can’t perform that action at this time.
0 commit comments