Skip to content

Commit

Permalink
support connect token
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXiaoM committed Dec 4, 2023
1 parent c43b151 commit 4785d2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
)
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4785d2a

Please sign in to comment.