Skip to content

Commit

Permalink
fix: online message delay for group list init, #27
Browse files Browse the repository at this point in the history
  • Loading branch information
cssxsh committed Aug 15, 2023
1 parent d43b9ed commit 43affcb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/kotlin/xyz/cssxsh/mirai/admin/MiraiOnlineMessage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ internal object MiraiOnlineMessage : BotOnlineAction, MiraiOnlineMessageConfig b

override suspend fun run(bot: Bot) {
if (cache.add(bot.id)) return
if (bot.groups.isEmpty()) {
delay(3_000)
}
for (group in bot.groups) {
if (!permission.testPermission(group.permitteeId)) continue

Expand Down

0 comments on commit 43affcb

Please sign in to comment.