webui主页和插件管理api更新

This commit is contained in:
HibiKier
2024-01-06 17:36:22 +08:00
parent c146df3d25
commit a5bb1f768e
19 changed files with 711 additions and 579 deletions
+3 -3
View File
@@ -1,13 +1,13 @@
import asyncio
import os
from typing import Tuple
from nonebot import on_command
from nonebot.adapters.onebot.v11 import Bot, GroupMessageEvent, Message, MessageEvent
from nonebot.params import Command, CommandArg
from nonebot.params import CommandArg
from configs.path_config import DATA_PATH, IMAGE_PATH
from models.group_info import GroupInfo
from utils.depends import OneCommand
from utils.image_utils import BuildMat
from utils.manager import plugins2settings_manager
from utils.message_builder import image
@@ -91,7 +91,7 @@ statistics_user_file = DATA_PATH / "statistics" / "_prefix_user_count.json"
@statistics.handle()
async def _(bot: Bot, event: MessageEvent, cmd: Tuple[str, ...] = Command(), arg: Message = CommandArg()):
async def _(bot: Bot, event: MessageEvent, cmd: str = OneCommand(), arg: Message = CommandArg()):
msg = arg.extract_plain_text().strip()
if cmd[0][:2] == "全局":
if str(event.user_id) in bot.config.superusers: