Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
2mf8 committed Aug 20, 2022
1 parent beded01 commit 3ba793c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ func (msg *Msg) Poke(qq int64) *Msg {
return msg
}

// GMC专用
func (msg *Msg) Reply(messageId int32) *Msg {
msg.MessageList = append(msg.MessageList, &onebot.Message{
Type: "reply",
Expand All @@ -117,6 +118,17 @@ func (msg *Msg) Reply(messageId int32) *Msg {
return msg
}

// GMC 1.1.0 以上版本和pbrq皆可用
func (msg *Msg) ReplyByMessageReceipt(messageId *onebot.MessageReceipt) *Msg {
msg.MessageList = append(msg.MessageList, &onebot.Message{
Type: "reply",
Data: map[string]string{
"message_id": messageId.String(),
},
})
return msg
}

func (msg *Msg) Dice(value int64) *Msg {
msg.MessageList = append(msg.MessageList, &onebot.Message{
Type: "dice",
Expand Down

0 comments on commit 3ba793c

Please sign in to comment.