Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Colter23/bilibili-dynamic-mirai-p…
Browse files Browse the repository at this point in the history
…lugin
  • Loading branch information
Colter23 committed Apr 4, 2022
2 parents 5e38305 + a5a2049 commit c608c98
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/kotlin/top/colter/mirai/plugin/bilibili/Listener.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ internal object Listener : CoroutineScope by PluginMain.childScope("Listener") {
globalEventChannel().subscribeAlways<MyEvent> {
val c = DynamicTasker.dynamic[uid]?.contacts?.get(subject)
if (c == null) {
message.sender.sendMessage("还没有订阅这个人哦")
message.subject.sendMessage("还没有订阅这个人哦")
return@subscribeAlways
}
var cfgStr = "11"
message.sender.sendMessage("检测动态内容 0:不检测动态 1:动态(包含视频) 2:仅视频 \n请回复 0 或 1 或 2")
message.subject.sendMessage("检测动态内容 0:不检测动态 1:动态(包含视频) 2:仅视频 \n请回复 0 或 1 或 2")
message.selectMessagesUnit {
"0"{
cfgStr = "0${cfgStr[1]}"
Expand All @@ -56,11 +56,11 @@ internal object Listener : CoroutineScope by PluginMain.childScope("Listener") {
}
defaultReply { "失败(¬_¬ )" }
timeout(30_000) {
message.sender.sendMessage("超时ಠಿ_ಠ")
message.subject.sendMessage("超时ಠಿ_ಠ")
}
}

message.sender.sendMessage("是否检测直播 0:不检测 1:检测\n请回复 0 或 1")
message.subject.sendMessage("是否检测直播 0:不检测 1:检测\n请回复 0 或 1")
message.selectMessagesUnit {
"0"{
cfgStr = "${cfgStr[0]}0"
Expand All @@ -69,13 +69,13 @@ internal object Listener : CoroutineScope by PluginMain.childScope("Listener") {
cfgStr = "${cfgStr[0]}1"
}
defaultReply { "失败(¬_¬ )" }
timeout(30_000) { message.sender.sendMessage("超时ಠಿ_ಠ") }
timeout(30_000) { message.subject.sendMessage("超时ಠಿ_ಠ") }
}

DynamicTasker.mutex.withLock {
DynamicTasker.dynamic[uid]?.contacts?.set(subject, cfgStr)
}
message.sender.sendMessage("配置结束")
message.subject.sendMessage("配置结束")
}
}

Expand Down

0 comments on commit c608c98

Please sign in to comment.