From ff1b5d02d2647e54eb07e7338ecd205004078695 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Sun, 20 Aug 2023 13:56:50 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=88=9D=E6=AC=A1?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E5=90=8E=E6=8A=A5=E9=94=99=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cores/qqbot/core.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cores/qqbot/core.py b/cores/qqbot/core.py index 975fa8202..a6e961950 100644 --- a/cores/qqbot/core.py +++ b/cores/qqbot/core.py @@ -363,7 +363,11 @@ def run_qqchan_bot(cfg, loop, qqchannel_bot): qqchannel_bot.run_bot(client, cfg['qqbot']['appid'], cfg['qqbot']['token']) except BaseException as e: gu.log("启动QQ频道机器人时出现错误, 原因如下: " + str(e), gu.LEVEL_CRITICAL, tag="QQ频道") - gu.log(r"【提醒】有可能你想启动的是gocq, 并不是这个旧版的QQ频道SDK, 如果是这样, 请修改配置文件(QQChannelChatGPT/config.yaml)详情请看:https://github.com/Soulter/QQChannelChatGPT/wiki/%E4%BA%8C%E3%80%81%E9%A1%B9%E7%9B%AE%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E9%85%8D%E7%BD%AE。" + str(e), gu.LEVEL_CRITICAL, tag="QQ频道") + gu.log(r"【提醒】如果您是初次启动,请修改配置文件(QQChannelChatGPT/config.yaml)详情请看:https://github.com/Soulter/QQChannelChatGPT/wiki。" + str(e), gu.LEVEL_CRITICAL, tag="System") + + i = input("输入y打开配置文件, 按回车退出程序。") + if i == "y": + os.system("start QQChannelChatGPT/config.yaml") # gu.log("如果你使用了go-cqhttp, 则可以忽略上面的报错。" + str(e), gu.LEVEL_CRITICAL, tag="QQ频道") # input(f"\n[System-Error] 启动QQ频道机器人时出现错误,原因如下:{e}\n可能是没有填写QQBOT appid和token?请在config中完善你的appid和token\n配置教程:https://soulter.top/posts/qpdg.html\n") @@ -464,7 +468,7 @@ def oper_msg(message, if isinstance(nick_qq, str): nick_qq = (nick_qq,) if isinstance(nick_qq, list): - nick_qq = tuple(nick_qq) + nick_qq = tuple(nick_qq) if platform == PLATFORM_QQCHAN: with_tag = True