From 1198545d5927c1645b25a9810aba302b42faa838 Mon Sep 17 00:00:00 2001 From: Kyomotoi <1172294279@qq.com> Date: Sun, 8 Nov 2020 17:46:06 +0800 Subject: [Update] --- bot.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'bot.py') diff --git a/bot.py b/bot.py index ab4cf07..8a42b0a 100644 --- a/bot.py +++ b/bot.py @@ -31,7 +31,6 @@ time.sleep(1) # 检查是否符合条件运行 checkATRI() -time.sleep(1) # 读取配置 CONFIG_PATH = Path('.') / 'config.yml' @@ -39,10 +38,11 @@ config = load_yaml(CONFIG_PATH) config = config['bot'] # 初始化 -nonebot.init(DEBUG=config['debug'], - SUPERUSSERS=config['superusers'], - NICKNAME=config['nickname'], - COMMAND_SEP=config['command_sep']) +nonebot.init(debug=bool(config['debug']), + superusers=set(config['superusers']), + nickname=set(config['nickname']), + command_start=set(config['command_start']), + command_sep=set(config['command_sep'])) app = nonebot.get_asgi() # 读取插件目录 @@ -71,6 +71,4 @@ logger.add(LOGGER_ERROR_PATH, format=default_format) if __name__ == '__main__': - nonebot.run(app='bot:app', - host=config['host'], - port=config['port']) + nonebot.run(app='bot:app', host=config['host'], port=config['port']) -- cgit v1.2.3