From a6537628d5d52f1f09bc9cb8b3d7687bef9ff9d7 Mon Sep 17 00:00:00 2001 From: RTAkland Date: Thu, 26 Sep 2024 21:56:16 +0800 Subject: [PATCH] fix: fix zibi not work --- src/main/kotlin/cn/rtast/fancybot/commands/misc/ZiBiCommand.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/cn/rtast/fancybot/commands/misc/ZiBiCommand.kt b/src/main/kotlin/cn/rtast/fancybot/commands/misc/ZiBiCommand.kt index 65fb141..ea573e6 100644 --- a/src/main/kotlin/cn/rtast/fancybot/commands/misc/ZiBiCommand.kt +++ b/src/main/kotlin/cn/rtast/fancybot/commands/misc/ZiBiCommand.kt @@ -31,13 +31,14 @@ class ZiBiCommand : BaseCommand() { .addText("私聊发送`我想开了`即可取消禁言~") .build() message.reply(msg) - users[message.sender.userId] = message.groupId } catch (_: Exception) { val msg = MessageChain.Builder() .addText("你输入有误所以我决定让你自闭1天~") .build() message.reply(msg) message.sender.ban(86400) + } finally { + users[message.sender.userId] = message.groupId } } }