We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
CONNECTING_TO_WEBSOCKET
1 parent 1e00cc7 commit 282cafbCopy full SHA for 282cafb
src/main/kotlin/io/github/freya022/botcommands/internal/core/ReadyListener.kt
@@ -25,7 +25,8 @@ internal class ReadyListener {
25
@BEventListener(priority = Int.MAX_VALUE, mode = RunMode.BLOCKING)
26
internal suspend fun onConnectEvent(event: StatusChangeEvent, context: BContext) {
27
// At this point, JDA should be usable
28
- if (!connected && event.newStatus == JDA.Status.CONNECTING_TO_WEBSOCKET) {
+ // Use >= because any event beyond this point is a valid JDA instance
29
+ if (!connected && event.newStatus >= JDA.Status.CONNECTING_TO_WEBSOCKET) {
30
lock.withLock {
31
if (connected) return
32
connected = true
0 commit comments