🎨 优化发给新成员的消息

This commit is contained in:
李寻欢
2024-05-14 11:50:27 +08:00
parent bd33759b80
commit 386e0dd6d3
2 changed files with 18 additions and 2 deletions

View File

@@ -73,8 +73,20 @@ func Sync() {
log.Printf("新增好友失败: %s", err.Error())
continue
}
// 发送一条新消息
utils.SendMessage(friend.Wxid, "", "大家好我是一个AI机器人可以直接@我询问你想问的问题。该功能默认未启用,请群主艾特我并发送 /ai enable 指令启用", 0)
if conf, ok := config.Conf.Resource["introduce"]; ok {
// 发送一条新消息
switch conf.Type {
case "text":
// 文字类型
utils.SendMessage(friend.Wxid, "", conf.Path, 0)
case "image":
// 图片类型
utils.SendImage(friend.Wxid, conf.Path, 0)
case "emotion":
// 表情类型
utils.SendEmotion(friend.Wxid, conf.Path, 0)
}
}
} else {
pm := map[string]any{
"nickname": friend.Nickname,