Skip to content

Commit

Permalink
fix: broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
guimc233 committed Aug 1, 2024
1 parent 83b479e commit 915dd6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/kotlin/ltd/guimc/lgzbot/command/LGZBotCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ object LGZBotCommand : CompositeCommand(
@SubCommand("broadcast")
@Description("广播")
suspend fun CommandSenderOnMessage<*>.iI1I1i1iIi1i(content: String) {
for (group in (getBotOrNull() ?: return).groups) {
if (group.botPermission.level >= 1) {
for (groups in (getBotOrNull() ?: return).groups) {
if (groups.botPermission.level >= 1) {
try {
sendMessage(content)
groups.sendMessage(content)
} catch (_: Exception) {
}
Thread.sleep(RandomUtils.nextLong(1500, 2000))
Expand Down

0 comments on commit 915dd6c

Please sign in to comment.