🎨 优化发给新成员的消息
This commit is contained in:
parent
bd33759b80
commit
386e0dd6d3
@ -87,6 +87,10 @@ resource:
|
|||||||
welcome-new:
|
welcome-new:
|
||||||
type: emotion
|
type: emotion
|
||||||
path: 58e4150be2bba8f7b71974b10391f9e9
|
path: 58e4150be2bba8f7b71974b10391f9e9
|
||||||
|
# 给新好友或者群的自我介绍,不配置就不发送
|
||||||
|
introduce:
|
||||||
|
type: text
|
||||||
|
path: "大家好,我是一个AI机器人,可以直接@我询问你想问的问题。"
|
||||||
# 水群排行榜词云,只能是图片,末尾的`\%s`也是必须的
|
# 水群排行榜词云,只能是图片,末尾的`\%s`也是必须的
|
||||||
wordcloud:
|
wordcloud:
|
||||||
type: image
|
type: image
|
||||||
|
@ -73,8 +73,20 @@ func Sync() {
|
|||||||
log.Printf("新增好友失败: %s", err.Error())
|
log.Printf("新增好友失败: %s", err.Error())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// 发送一条新消息
|
if conf, ok := config.Conf.Resource["introduce"]; ok {
|
||||||
utils.SendMessage(friend.Wxid, "", "大家好,我是一个AI机器人,可以直接@我询问你想问的问题。该功能默认未启用,请群主艾特我并发送 /ai enable 指令启用", 0)
|
// 发送一条新消息
|
||||||
|
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 {
|
} else {
|
||||||
pm := map[string]any{
|
pm := map[string]any{
|
||||||
"nickname": friend.Nickname,
|
"nickname": friend.Nickname,
|
||||||
|
Loading…
Reference in New Issue
Block a user