From 881b08c41fd4e735dd090a39ce01487c476a4967 Mon Sep 17 00:00:00 2001 From: passthem Date: Wed, 13 May 2026 15:33:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A4=E6=96=B9=E6=99=9A=E5=AE=89=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- konabot/docs/user/此方晚安.txt | 8 ++++++++ konabot/plugins/oyasumi/__init__.py | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 konabot/docs/user/此方晚安.txt diff --git a/konabot/docs/user/此方晚安.txt b/konabot/docs/user/此方晚安.txt new file mode 100644 index 0000000..d91d570 --- /dev/null +++ b/konabot/docs/user/此方晚安.txt @@ -0,0 +1,8 @@ +# 指令介绍 + +**此方晚安** - 让此方 BOT 禁言你一段时间 + +## 指令格式 + +- `@此方BOT 此方晚安`: 禁言几个小时 +- `@此方BOT 此方午安`: 禁言几十分钟 diff --git a/konabot/plugins/oyasumi/__init__.py b/konabot/plugins/oyasumi/__init__.py index 14bff90..2c345b5 100644 --- a/konabot/plugins/oyasumi/__init__.py +++ b/konabot/plugins/oyasumi/__init__.py @@ -21,7 +21,9 @@ async def make_sleep(event: GroupMessageEvent, bot: Bot, duration: int): minutes = (duration // 60) % 60 hours = duration // 3600 - message = f" 晚安!已获得 {hours} 小时 {minutes} 分钟 {seconds} 秒的睡眠💤" + t1 = f"{hours} 小时 {minutes} 分钟 {seconds} 秒" + + message = f" 好好睡吧!奖励你 {t1}的睡眠💤" message = UniMessage.at(str(event.user_id)).text(message) await message.send(target=event, bot=bot)