diff --git a/docs/.vuepress/public/assets/resources.json b/docs/.vuepress/public/assets/resources.json index 1b0a6a1..04dfeab 100644 --- a/docs/.vuepress/public/assets/resources.json +++ b/docs/.vuepress/public/assets/resources.json @@ -31,9 +31,15 @@ "link": "https://cdn.liteyuki.icu/static/lrp/custom-device.zip" }, { - "name": "示例包3", + "name": "轻雪傲娇系词库", "author": "SnowyKami", - "description": "A simple bot that shows the status of the bot and the server.", - "link": "" + "description": "使用https://github.com/Kyomotoi/AnimeThesaurus的词库", + "link": "https://cdn.liteyuki.icu/static/lrp/liteyuki_words_aojiao.zip" + }, + { + "name": "轻雪可爱系词库", + "author": "SnowyKami", + "description": "使用https://github.com/Kyomotoi/AnimeThesaurus的词库", + "link": "https://cdn.liteyuki.icu/static/lrp/liteyuki_words_kawaii.zip" } ] \ No newline at end of file diff --git a/liteyuki/plugins/liteyuki_pacman/npm.py b/liteyuki/plugins/liteyuki_pacman/npm.py index c611496..26bd8a2 100644 --- a/liteyuki/plugins/liteyuki_pacman/npm.py +++ b/liteyuki/plugins/liteyuki_pacman/npm.py @@ -128,7 +128,6 @@ async def _(result: Arparma, event: T_MessageEvent, bot: T_Bot, npm: Matcher): else: raise FinishedException(ulang.get("Permission Denied")) - session_enable = get_plugin_session_enable(new_event, plugin_name) # 获取插件当前状态 can_be_toggled = get_plugin_can_be_toggle(plugin_name) # 获取插件是否可以被启用/停用 diff --git a/liteyuki/plugins/liteyuki_pacman/rpm.py b/liteyuki/plugins/liteyuki_pacman/rpm.py index 7a2154c..456c300 100644 --- a/liteyuki/plugins/liteyuki_pacman/rpm.py +++ b/liteyuki/plugins/liteyuki_pacman/rpm.py @@ -3,6 +3,7 @@ import os import zipfile import yaml from nonebot import require +from nonebot.internal.matcher import Matcher from nonebot.permission import SUPERUSER from liteyuki.utils.base.language import get_user_lang @@ -55,10 +56,12 @@ from nonebot_plugin_alconna import Alconna, Args, on_alconna, Arparma, Subcomman ), permission=SUPERUSER ).handle() -async def _(bot: T_Bot, event: T_MessageEvent, result: Arparma): +async def _(bot: T_Bot, event: T_MessageEvent, result: Arparma, matcher: Matcher): ulang = get_user_lang(str(event.user_id)) reply = "" + send_as_md = False if result.subcommands.get("list"): + send_as_md = True loaded_rps = get_loaded_resource_packs() reply += f"{ulang.get('liteyuki.loaded_resources', NUM=len(loaded_rps))}\n" for rp in loaded_rps: @@ -176,13 +179,8 @@ async def _(bot: T_Bot, event: T_MessageEvent, result: Arparma): NUM=len(get_loaded_resource_packs()) ) else: - btn_reload = md.btn_cmd( - ulang.get("liteyuki.reload_resources"), - f"rpm reload" - ) - btn_list = md.btn_cmd( - ulang.get("liteyuki.list_resources"), - f"rpm list" - ) - reply += f"{btn_list} \n {btn_reload}" - await md.send_md(reply, bot, event=event) + pass + if send_as_md: + await md.send_md(reply, bot, event=event) + else: + await matcher.finish(reply)