feat: 支持修改入群欢迎

This commit is contained in:
Soulter
2023-05-31 10:07:15 +08:00
parent 55d58d30a8
commit c3acb3e77f
+3 -2
View File
@@ -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")