From 83b479eb3f696b85d50607713a153d2e605b28f5 Mon Sep 17 00:00:00 2001 From: Guimc Date: Thu, 1 Aug 2024 19:55:01 +0800 Subject: [PATCH] feat: /lgzbot broadcast --- src/main/kotlin/ltd/guimc/lgzbot/command/LGZBotCommand.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ltd/guimc/lgzbot/command/LGZBotCommand.kt b/src/main/kotlin/ltd/guimc/lgzbot/command/LGZBotCommand.kt index abfd65d..e273dfe 100644 --- a/src/main/kotlin/ltd/guimc/lgzbot/command/LGZBotCommand.kt +++ b/src/main/kotlin/ltd/guimc/lgzbot/command/LGZBotCommand.kt @@ -154,9 +154,9 @@ object LGZBotCommand : CompositeCommand( @SubCommand("broadcast") @Description("广播") - suspend fun CommandSenderOnMessage<*>.iI1I1i1iIi1i(content: String, onlyAdmin: Boolean = true) { + suspend fun CommandSenderOnMessage<*>.iI1I1i1iIi1i(content: String) { for (group in (getBotOrNull() ?: return).groups) { - if (group.botPermission.level >= 1 || !onlyAdmin) { + if (group.botPermission.level >= 1) { try { sendMessage(content) } catch (_: Exception) {