mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-07-27 15:40:56 +00:00
: zap: 添加api请求超时限制
This commit is contained in:
@ -10,11 +10,10 @@ load_resources()
|
||||
init_log()
|
||||
|
||||
nonebot.plugin.load_plugins("liteyuki/plugins")
|
||||
|
||||
# 从数据库读取已安装的插件
|
||||
if not get_config("safe_mode", False):
|
||||
# 安全模式下,不加载插件
|
||||
nonebot.plugin.load_plugins("plugins")
|
||||
|
||||
installed_plugins: list[InstalledPlugin] = plugin_db.all(InstalledPlugin())
|
||||
if installed_plugins:
|
||||
for installed_plugin in installed_plugins:
|
||||
@ -22,5 +21,7 @@ if not get_config("safe_mode", False):
|
||||
nonebot.logger.error(f"{installed_plugin.module_name} not installed, but in loading database. please run `npm fixup` in chat to reinstall it.")
|
||||
else:
|
||||
nonebot.load_plugin(installed_plugin.module_name)
|
||||
|
||||
nonebot.plugin.load_plugins("plugins")
|
||||
else:
|
||||
nonebot.logger.info("Safe mode is on, no plugin loaded.")
|
||||
|
Reference in New Issue
Block a user