Skip to content

Commit

Permalink
优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
CuteReimu committed Sep 23, 2024
1 parent 6e5d405 commit 2665a05
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/kotlin/QQPusher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ object QQPusher {
newScoreMap: HashMap<String, Int>,
pushToQQ: Boolean,
) {
if (!Config.EnablePush) return
val lines = ArrayList<String>()
val map = HashMap<String, String>()
lines.add("对局结果")
Expand Down Expand Up @@ -114,7 +113,7 @@ object QQPusher {
@OptIn(DelicateCoroutinesApi::class)
GlobalScope.launch {
try {
if (pushToQQ)
if (Config.EnablePush && pushToQQ)
Config.PushQQGroups.forEach { sendGroupMessage(it, text, false, *at) }
File("history").mkdirs()
map.forEach(::addHistory)
Expand Down

0 comments on commit 2665a05

Please sign in to comment.