mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-11 05:17:24 +08:00
fix: require()插件错误
This commit is contained in:
parent
4bfed64586
commit
cc70a8ab2c
@ -1,9 +1,12 @@
|
||||
from nonebot import require
|
||||
from nonebot.permission import SUPERUSER
|
||||
from nonebot_plugin_alconna import Alconna, Arparma, on_alconna
|
||||
|
||||
from liteyuki.utils.config import config
|
||||
from liteyuki.utils.ly_typing import T_Bot
|
||||
|
||||
require("nonebot_plugin_alconna")
|
||||
from nonebot_plugin_alconna import on_alconna, Alconna
|
||||
|
||||
cmd_liteyuki = on_alconna(
|
||||
Alconna(
|
||||
"liteyuki"
|
||||
|
@ -1,13 +1,11 @@
|
||||
import nonebot
|
||||
from nonebot import on_command, on_message
|
||||
from nonebot.adapters.onebot.v11 import MessageSegment
|
||||
from nonebot.exception import FinishedException
|
||||
from nonebot import on_command
|
||||
from nonebot.params import CommandArg
|
||||
from nonebot.permission import SUPERUSER
|
||||
from nonebot.plugin import PluginMetadata
|
||||
|
||||
from liteyuki.utils.ly_typing import T_Bot, T_MessageEvent, v11
|
||||
from liteyuki.utils.message import send_markdown
|
||||
from liteyuki.utils.ly_typing import T_Message, T_Bot, v11, T_MessageEvent
|
||||
|
||||
md_test = on_command("mdts", aliases={"会话md"}, permission=SUPERUSER)
|
||||
md_group = on_command("mdg", aliases={"群md"}, permission=SUPERUSER)
|
||||
|
@ -6,14 +6,16 @@ import aiohttp
|
||||
import nonebot
|
||||
import pip
|
||||
from arclet.alconna import Arparma, MultiVar
|
||||
from nonebot import require
|
||||
from nonebot.permission import SUPERUSER
|
||||
from nonebot_plugin_alconna import Alconna, Args, Subcommand, on_alconna
|
||||
|
||||
from liteyuki.utils.language import get_user_lang
|
||||
from liteyuki.utils.ly_typing import T_Bot
|
||||
from liteyuki.utils.message import Markdown as md, send_markdown
|
||||
from .common import *
|
||||
|
||||
require("nonebot_plugin_alconna")
|
||||
from nonebot_plugin_alconna import Alconna, Args, Subcommand, on_alconna
|
||||
|
||||
npm_alc = on_alconna(
|
||||
Alconna(
|
||||
["npm", "插件"],
|
||||
|
@ -1,12 +1,11 @@
|
||||
import os
|
||||
|
||||
import nonebot.plugin
|
||||
from nonebot import on_command
|
||||
from nonebot import on_command, require
|
||||
from nonebot.exception import FinishedException
|
||||
from nonebot.internal.matcher import Matcher
|
||||
from nonebot.message import run_preprocessor
|
||||
from nonebot.permission import SUPERUSER
|
||||
from nonebot_plugin_alconna import on_alconna, Alconna, Args, Arparma
|
||||
|
||||
from liteyuki.utils.data_manager import GroupChat, InstalledPlugin, User, group_db, plugin_db, user_db
|
||||
from liteyuki.utils.message import Markdown as md, send_markdown
|
||||
@ -16,6 +15,9 @@ from liteyuki.utils.language import get_user_lang
|
||||
from .common import get_plugin_can_be_toggle, get_plugin_global_enable, get_plugin_session_enable, get_plugin_default_enable
|
||||
from .installer import get_store_plugin, npm_update
|
||||
|
||||
require("nonebot_plugin_alconna")
|
||||
from nonebot_plugin_alconna import on_alconna, Alconna, Args, Arparma
|
||||
|
||||
list_plugins = on_alconna(
|
||||
Alconna(
|
||||
['list-plugins', "插件列表", "列出插件"],
|
||||
@ -53,7 +55,6 @@ async def _(event: T_MessageEvent, bot: T_Bot):
|
||||
session_enable = get_plugin_session_enable(event, plugin.module_name)
|
||||
default_enable = get_plugin_default_enable(plugin.module_name)
|
||||
|
||||
|
||||
if store_plugin:
|
||||
btn_homepage = md.link(lang.get('npm.homepage'), store_plugin.homepage)
|
||||
show_name = store_plugin.name
|
||||
|
@ -1,6 +1,6 @@
|
||||
from typing import Optional
|
||||
|
||||
from nonebot_plugin_alconna import Alconna, Args, Arparma, Subcommand, on_alconna
|
||||
from nonebot import require
|
||||
|
||||
from liteyuki.utils.data import LiteModel
|
||||
from liteyuki.utils.data_manager import User, user_db
|
||||
@ -8,6 +8,9 @@ from liteyuki.utils.language import Language, get_all_lang, get_user_lang
|
||||
from liteyuki.utils.ly_typing import T_Bot, T_MessageEvent
|
||||
from liteyuki.utils.message import Markdown as md, send_markdown
|
||||
|
||||
require("nonebot_plugin_alconna")
|
||||
from nonebot_plugin_alconna import Alconna, Args, Arparma, Subcommand, on_alconna
|
||||
|
||||
profile_alc = on_alconna(
|
||||
Alconna(
|
||||
["profile", "个人信息"],
|
||||
|
Loading…
Reference in New Issue
Block a user