From cd927ec2c437ab6e464ed7b43514f072dd2c381c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sun, 11 Dec 2022 14:11:38 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E4=BC=98=E5=8C=96chatgpt=20rese?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/ai_reply/main.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugin/ai_reply/main.go b/plugin/ai_reply/main.go index f7a308b514..42c4b57977 100644 --- a/plugin/ai_reply/main.go +++ b/plugin/ai_reply/main.go @@ -35,7 +35,7 @@ func init() { // 插件主体 enr := control.Register("aireply", &ctrl.Options[*zero.Ctx]{ DisableOnDefault: false, Brief: "人工智能回复", - Help: "- @Bot 任意文本(任意一句话回复)\n- 设置回复模式[青云客|小爱|ChatGPT]\n- 设置 ChatGPT SessionToken xxx", + Help: "- @Bot 任意文本(任意一句话回复)\n- 设置回复模式[青云客|小爱|ChatGPT]\n- 设置 ChatGPT SessionToken xxx\n- 重置ChatGPT连接", PrivateDataFolder: "aireply", }) @@ -109,7 +109,11 @@ func init() { // 插件主体 }) enr.OnFullMatch("重置ChatGPT连接").SetBlock(true).Handle(func(ctx *zero.Ctx) { - chats.Reset(ctx.Event.UserID) + err := chats.Reset(ctx.Event.UserID) + if err != nil { + ctx.SendChain(message.Text("ERROR: ", err)) + return + } ctx.SendChain(message.Text("成功")) })