mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-07-27 15:40:56 +00:00
fix: 数据库支持
This commit is contained in:
@ -16,11 +16,10 @@ nonebot.plugin.load_plugins("plugins")
|
||||
|
||||
init_log()
|
||||
|
||||
installed_plugins = plugin_db.all(InstalledPlugin)
|
||||
installed_plugins: list[InstalledPlugin] = plugin_db.all(InstalledPlugin())
|
||||
if installed_plugins:
|
||||
for installed_plugin in plugin_db.all(InstalledPlugin):
|
||||
if not check_for_package(installed_plugin.module_name):
|
||||
for installed_plugin in installed_plugins:
|
||||
if not installed_plugin.liteyuki and not check_for_package(installed_plugin.module_name):
|
||||
nonebot.logger.error(f"{installed_plugin.module_name} not installed, but in loading database. please run `npm fixup` in chat to reinstall it.")
|
||||
else:
|
||||
print(installed_plugin.module_name)
|
||||
nonebot.load_plugin(installed_plugin.module_name)
|
||||
|
Reference in New Issue
Block a user