From c3acb3e77fe8976812208c0fa7af9fc92af77e78 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Wed, 31 May 2023 10:07:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=85=A5=E7=BE=A4=E6=AC=A2=E8=BF=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cores/qqbot/core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cores/qqbot/core.py b/cores/qqbot/core.py index f8fa943e1..548836422 100644 --- a/cores/qqbot/core.py +++ b/cores/qqbot/core.py @@ -121,6 +121,7 @@ cnt_valid = 0 # 新版配置文件 cc = CmdConfig.CmdConfig() cc.init_attributes(["qq_forward_threshold"], 200) +cc.init_attributes(["qq_welcome"], "欢迎加入本群!\n欢迎给https://github.com/Soulter/QQChannelChatGPT项目一个Star😊~\n输入help查看帮助~\n") def new_sub_thread(func, args=()): @@ -791,9 +792,9 @@ class gocqClient(): @gocq_app.receiver("GroupMemberIncrease") async def _(app: CQHTTP, source: GroupMemberIncrease): - global nick_qq + global nick_qq, cc await app.sendGroupMessage(source.group_id, [ - Plain(text=f"欢迎加入本群!\n欢迎给https://github.com/Soulter/QQChannelChatGPT项目一个Star😊~\n@我输入help查看帮助~\n") + Plain(text=cc.get("qq_welcome", "欢迎新人~")), ]) @gocq_app.receiver("GuildMessage")