mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-07-28 15:00:56 +00:00
feat: 新的背景图
fix: 命令冲突 docs: 添加了命令头和nickname冲突的解释
This commit is contained in:
@ -22,9 +22,9 @@ driver = get_driver()
|
||||
|
||||
markdown_image = common_db.first(StoredConfig(), default=StoredConfig()).config.get("markdown_image", False)
|
||||
|
||||
cmd_liteyuki = on_alconna(
|
||||
Alconna(
|
||||
"liteyuki"
|
||||
liteyuki = on_alconna(
|
||||
command=Alconna(
|
||||
"liteecho",
|
||||
),
|
||||
permission=SUPERUSER
|
||||
)
|
||||
@ -73,9 +73,9 @@ switch_image_mode = on_alconna(
|
||||
)
|
||||
|
||||
|
||||
@cmd_liteyuki.handle()
|
||||
@liteyuki.handle()
|
||||
async def _(bot: T_Bot):
|
||||
await cmd_liteyuki.finish(f"Hello, Liteyuki!\nBot {bot.self_id}\nLiteyukiID {config.get('liteyuki_id', 'No')}")
|
||||
await liteyuki.finish(f"Hello, Liteyuki!\nBot {bot.self_id}")
|
||||
|
||||
|
||||
@update_liteyuki.handle()
|
||||
|
@ -1,4 +1,4 @@
|
||||
import os
|
||||
import os.path
|
||||
|
||||
import nonebot.plugin
|
||||
|
||||
@ -7,15 +7,19 @@ from liteyuki.utils.data_manager import InstalledPlugin, plugin_db
|
||||
from liteyuki.utils.resource import load_resource_from_dir
|
||||
from liteyuki.utils.tools import check_for_package
|
||||
|
||||
THIS_PLUGIN_NAME = os.path.basename(os.path.dirname(__file__))
|
||||
# 加载默认资源和语言
|
||||
RESOURCE_PATH = "liteyuki/resources"
|
||||
load_resource_from_dir(RESOURCE_PATH)
|
||||
init_log()
|
||||
# 加载其他资源包
|
||||
if os.path.exists("resources"):
|
||||
for resource in os.listdir("resources"):
|
||||
load_resource_from_dir(os.path.join("resources", resource))
|
||||
|
||||
nonebot.plugin.load_plugins("liteyuki/plugins")
|
||||
nonebot.plugin.load_plugins("plugins")
|
||||
|
||||
init_log()
|
||||
|
||||
# 从数据库读取已安装的插件
|
||||
installed_plugins: list[InstalledPlugin] = plugin_db.all(InstalledPlugin())
|
||||
if installed_plugins:
|
||||
for installed_plugin in installed_plugins:
|
||||
|
Reference in New Issue
Block a user