From be2747e4d4b820ca0f1f988d3b77a628da26fe7b Mon Sep 17 00:00:00 2001 From: Kyomotoi Date: Thu, 8 Jul 2021 22:09:00 +0800 Subject: =?UTF-8?q?=F0=9F=94=96=E2=99=BB=EF=B8=8F=F0=9F=90=9B=F0=9F=94=A7?= =?UTF-8?q?=F0=9F=94=A5=F0=9F=93=9D=20=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=EF=BC=9AYHN-001-A03?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🔖 更新版本至:YHN-001-A03 ✨ 新增插件: - 涩图 - 闲聊(文爱 ♻️ 重构: - Service - 所有插件 🐛 修复部分小bug 🔧 暂时移除部分设置 🔥 删除: - 插件:nsfw、wife。日后加回 - 插件 essential 中部分内容 📝 更新README --- ATRI/plugins/manage/modules/shutdown.py | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 ATRI/plugins/manage/modules/shutdown.py (limited to 'ATRI/plugins/manage/modules/shutdown.py') diff --git a/ATRI/plugins/manage/modules/shutdown.py b/ATRI/plugins/manage/modules/shutdown.py deleted file mode 100644 index 78f23e8..0000000 --- a/ATRI/plugins/manage/modules/shutdown.py +++ /dev/null @@ -1,32 +0,0 @@ -from nonebot.typing import T_State -from nonebot.permission import SUPERUSER -from nonebot.adapters.cqhttp import Bot, MessageEvent - -from ATRI.service import Service as sv - - -__doc__ = """ -紧急停机 -权限组:维护者 -用法: - @ 关机 -""" - -shutdown = sv.on_command(cmd="关机", docs=__doc__, permission=SUPERUSER) - - -@shutdown.handle() -async def _shutdown(bot: Bot, event: MessageEvent, state: T_State) -> None: - msg = str(event.message).strip() - if msg: - state["msg"] = msg - - -@shutdown.got("msg", prompt="[WARNING]此项操作将强行终止bot运行,是否继续(y/n)") -async def __shutdown(bot: Bot, event: MessageEvent, state: T_State) -> None: - t = ["y", "Y", "是"] - if state["msg"] in t: - await bot.send(event, "咱还会醒来的,一定") - exit(0) - else: - await shutdown.finish("再考虑下吧 ;w;") -- cgit v1.2.3