Skip to content

Commit 43affcb

Browse files
committed
fix: online message delay for group list init, #27
1 parent d43b9ed commit 43affcb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/kotlin/xyz/cssxsh/mirai/admin/MiraiOnlineMessage.kt

+3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ internal object MiraiOnlineMessage : BotOnlineAction, MiraiOnlineMessageConfig b
5454

5555
override suspend fun run(bot: Bot) {
5656
if (cache.add(bot.id)) return
57+
if (bot.groups.isEmpty()) {
58+
delay(3_000)
59+
}
5760
for (group in bot.groups) {
5861
if (!permission.testPermission(group.permitteeId)) continue
5962

0 commit comments

Comments
 (0)