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)