Skip to content

Commit c8d5392

Browse files
committed
🐛 减少重复关键词
1 parent 278e4d1 commit c8d5392

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

plugin/aichat/main.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var (
4848
"- 查看AI聊天配置\n" +
4949
"- 重置AI聊天\n" +
5050
"- 群聊总结 [消息数目]|群聊总结 1000\n" +
51-
"- /g [内容] (使用大模型聊天)\n",
51+
"- /gpt [内容] (使用大模型聊天)\n",
5252

5353
PrivateDataFolder: "aichat",
5454
})
@@ -387,8 +387,8 @@ func init() {
387387
}
388388
})
389389

390-
// 添加 /g 命令处理(同时支持回复消息和直接使用)
391-
en.OnKeyword("/g", ensureconfig).SetBlock(true).Handle(func(ctx *zero.Ctx) {
390+
// 添加 /gpt 命令处理(同时支持回复消息和直接使用)
391+
en.OnKeyword("/gpt", ensureconfig).SetBlock(true).Handle(func(ctx *zero.Ctx) {
392392
text := ctx.MessageString()
393393

394394
var query string
@@ -416,8 +416,9 @@ func init() {
416416
}
417417
}
418418

419-
// 提取 /g 后面的内容
420-
parts := strings.SplitN(text, "/g", 2)
419+
// 提取 /gpt 后面的内容
420+
parts := strings.SplitN(text, "/gpt", 2)
421+
421422
var gContent string
422423
if len(parts) > 1 {
423424
gContent = strings.TrimSpace(parts[1])

0 commit comments

Comments
 (0)