Skip to content

Commit

Permalink
feat: /lgzbot broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
guimc233 committed Aug 1, 2024
1 parent 82db532 commit 83b479e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/ltd/guimc/lgzbot/command/LGZBotCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 83b479e

Please sign in to comment.