Compare commits
No commits in common. "8968def643832b66838c531293476f031732c32b" and "0dc79274c3559b64758a44faeb60b9448e22bd0c" have entirely different histories.
8968def643
...
0dc79274c3
@ -140,7 +140,3 @@ resource:
|
||||
wordcloud:
|
||||
type: image
|
||||
path: D:\Share\wordcloud\%s
|
||||
# 邀请入群消息回复
|
||||
invitationJoinGroup:
|
||||
type: text
|
||||
path: "您的邀请消息已收到啦,正在通知我的主人来同意请求。在我加群之后将会进行初始化操作,直到收到我主动发送的消息就是初始化完成咯,在那之前请耐心等待喔~"
|
||||
|
@ -14,21 +14,8 @@ import (
|
||||
// @description: 通知邀请入群消息到配置用户
|
||||
// @param m
|
||||
func NotifyInvitationJoinGroup(m *plugin.MessageContext) {
|
||||
// 先回复一条固定消息
|
||||
if conf, e := config.Conf.Resource["invitationJoinGroup"]; e {
|
||||
// 发送一条新消息
|
||||
switch conf.Type {
|
||||
case "text":
|
||||
// 文字类型
|
||||
_ = utils.SendMessage(m.FromUser, "", conf.Path, 0)
|
||||
case "image":
|
||||
// 图片类型
|
||||
utils.SendImage(m.FromUser, conf.Path, 0)
|
||||
case "emotion":
|
||||
// 表情类型
|
||||
utils.SendEmotion(m.FromUser, conf.Path, 0)
|
||||
}
|
||||
}
|
||||
// 先回复一条固定句子
|
||||
_ = utils.SendMessage(m.FromUser, m.GroupUser, "您的邀请消息已收到啦,正在通知我的主人来同意请求。在我加群之后将会进行初始化操作,直到收到我主动发送的消息就是初始化完成咯,在那之前请耐心等待喔~", 0)
|
||||
|
||||
// 如果是邀请进群,推送到配置的用户
|
||||
if flag, dec := m.IsInvitationJoinGroup(); flag {
|
||||
@ -36,7 +23,7 @@ func NotifyInvitationJoinGroup(m *plugin.MessageContext) {
|
||||
if user != "" {
|
||||
// 发送一条新消息
|
||||
dec = fmt.Sprintf("#邀请入群提醒\n\n%s", dec)
|
||||
_ = utils.SendMessage(user, "", dec, 0)
|
||||
utils.SendMessage(user, "", dec, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user