Skip to content

Commit

Permalink
延长第二答题判定的时间,文本上一些小修改
Browse files Browse the repository at this point in the history
  • Loading branch information
754978334 committed Aug 11, 2021
1 parent 67ab766 commit 74c10e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/main/kotlin/xyz/salieri/english/type/Comp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class Comp(number: Long){
// 有人回答出来了,加分
val answered = mutableSetOf<Long>(objEvent.sender.id)
val first = objEvent.sender.id
val timeOutMills = 500L
val timeOutMills = 1_000L
score[objEvent.sender.id] = 2 + score.getValue(objEvent.sender.id)

nextEventOrNull<GroupMessageEvent>(timeOutMills) {
Expand All @@ -143,7 +143,7 @@ class Comp(number: Long){
msg += """
${at(first)}首先回答正确,获得2分,当前积分${score[first]}
其他在${timeOutMills}ms内回答正确的有:
${(answered - first).joinToString("\n") { "${at(it)}获得1分,当前积分${score[it]}"}}
${(answered - first).joinToString("\n") { "${at(it)}获得1分,当前积分${score[it]}"}}
""".trimIndent()
}
Expand All @@ -154,8 +154,8 @@ class Comp(number: Long){
"[${it.pos}] ${it.tran}"
}

if( quesindex != quesnum )msg += "3s后继续,输入\"gkd\"立即开始下一题哦"
else msg += "3s后公布结果,输入\"gkd\"立即公布哦"
if( quesindex != quesnum )msg += "\n3s后继续,输入\"gkd\"立即开始下一题哦"
else msg += "\n3s后公布结果,输入\"gkd\"立即公布哦"

this.quesindex ++

Expand Down
4 changes: 0 additions & 4 deletions src/test/kotlin/RunMirai.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,5 @@ suspend fun main() {
EnglishHelperPlugin.load()
EnglishHelperPlugin.enable()

val bot = MiraiConsole.addBot(, "") {
fileBasedDeviceInfo()
}.alsoLogin()

MiraiConsole.job.join()
}

0 comments on commit 74c10e9

Please sign in to comment.