diff --git a/overflow-core/src/main/kotlin/top/mrxiaom/overflow/internal/Config.kt b/overflow-core/src/main/kotlin/top/mrxiaom/overflow/internal/Config.kt index 749909cd..7505a0da 100644 --- a/overflow-core/src/main/kotlin/top/mrxiaom/overflow/internal/Config.kt +++ b/overflow-core/src/main/kotlin/top/mrxiaom/overflow/internal/Config.kt @@ -9,4 +9,6 @@ data class Config( var wsHost: String = "ws://127.0.0.1:5800", @SerialName("reversed_ws_port") var reversedWSPort: Int = -1, + @SerialName("token") + var token: String = "" ) \ No newline at end of file diff --git a/overflow-core/src/main/kotlin/top/mrxiaom/overflow/internal/Overflow.kt b/overflow-core/src/main/kotlin/top/mrxiaom/overflow/internal/Overflow.kt index 9626d465..eae7512a 100644 --- a/overflow-core/src/main/kotlin/top/mrxiaom/overflow/internal/Overflow.kt +++ b/overflow-core/src/main/kotlin/top/mrxiaom/overflow/internal/Overflow.kt @@ -145,7 +145,12 @@ class Overflow : IMirai, CoroutineScope, LowLevelApiAccessor, OverflowAPI { } val service = ConnectFactory.create( - BotConfig(config.wsHost, config.reversedWSPort), logger + BotConfig( + url = config.wsHost, + reversedPort = config.reversedWSPort, + token = config.token, + isAccessToken = config.token.isNotBlank() + ), logger ) val dispatchers: EventBus val botImpl: cn.evolvefield.onebot.client.core.Bot