fix
This commit is contained in:
1 file changed
+3
-2
@@ -169,7 +169,7 @@ class FancyBot : OneBotListener {
|
|||||||
|
|
||||||
override suspend fun onGetGroupMessageResponse(message: GetMessage) {
|
override suspend fun onGetGroupMessageResponse(message: GetMessage) {
|
||||||
when (message.data.id) {
|
when (message.data.id) {
|
||||||
"revoke" -> AntiRevokeCommand.Companion.callback(this, message)
|
"revoke" -> AntiRevokeCommand.callback(this, message)
|
||||||
"imageUrl" -> ImageURLCommand.callback(this, message)
|
"imageUrl" -> ImageURLCommand.callback(this, message)
|
||||||
"reverseGif" -> ReverseGIFCommand.callback(this, message)
|
"reverseGif" -> ReverseGIFCommand.callback(this, message)
|
||||||
}
|
}
|
||||||
@@ -244,14 +244,15 @@ suspend fun main() {
|
|||||||
val rob = if (workType == WSType.Client) {
|
val rob = if (workType == WSType.Client) {
|
||||||
val address = configManager.wsAddress
|
val address = configManager.wsAddress
|
||||||
ROneBotFactory.createClient(address, accessToken, fancyBot)
|
ROneBotFactory.createClient(address, accessToken, fancyBot)
|
||||||
|
.also { it.addListeningGroups(*configManager.listeningGroups.toLongArray()) }
|
||||||
} else {
|
} else {
|
||||||
val port = configManager.wsPort
|
val port = configManager.wsPort
|
||||||
ROneBotFactory.createServer(port, accessToken, fancyBot)
|
ROneBotFactory.createServer(port, accessToken, fancyBot)
|
||||||
|
.also { it.addListeningGroups(*configManager.listeningGroups.toLongArray()) }
|
||||||
}
|
}
|
||||||
initDatabase()
|
initDatabase()
|
||||||
initFilesDir()
|
initFilesDir()
|
||||||
val commandManager = rob.commandManager
|
val commandManager = rob.commandManager
|
||||||
commands.forEach { commandManager.register(it) }
|
commands.forEach { commandManager.register(it) }
|
||||||
items.forEach { itemManager.register(it) }
|
items.forEach { itemManager.register(it) }
|
||||||
rob.addListeningGroups(*configManager.listeningGroups.toLongArray())
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user