Skip to content

Commit 678ee7d

Browse files
committed
feat(yogurt): log group disband event
1 parent ac7a80d commit 678ee7d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

yogurt/src/commonMain/kotlin/org/ntqqrev/yogurt/util/LoggingUtils.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,16 @@ fun Application.configureEventLogging() = launch {
300300
logger.d { b.toString() }
301301
}
302302

303+
is GroupDisbandEvent -> {
304+
val b = StringBuilder()
305+
val group = bot.getGroup(it.groupUin) ?: return@collect
306+
307+
b.append("[${group.displayString}] ")
308+
b.append("${it.operatorUin} 解散了群聊")
309+
310+
logger.d { b.toString() }
311+
}
312+
303313
is GroupNameChangeEvent -> {
304314
val b = StringBuilder()
305315
val group = bot.getGroup(it.groupUin) ?: return@collect

0 commit comments

Comments
 (0)