判断配置文件是否启用satori

This commit is contained in:
Expliyh 2024-05-16 22:15:04 +08:00
parent 4e6532ff0d
commit 351743068a
No known key found for this signature in database
GPG Key ID: F30DE0CFF6157916

View File

@ -12,6 +12,9 @@ if __name__ == "__mp_main__":
static_config = load_from_yaml("config.yml")
store_config.update(static_config)
nonebot.init(**store_config)
if not store_config['enable_satori']:
adapters = [v11.Adapter, v12.Adapter]
else:
adapters = [v11.Adapter, v12.Adapter, satori.Adapter]
driver = nonebot.get_driver()