summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/matterbridge/discordgo/message.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-11-22 19:21:34 +0100
committerGitHub <noreply@github.com>2020-11-22 19:21:34 +0100
commitaa274e5ab7176c83d79fd34dc6a33ba6d841bf5f (patch)
treea40e172471fecdc32aa3d6aefaa0e538a2181a2a /vendor/github.com/matterbridge/discordgo/message.go
parent7b3eaf3ccf59ad807e50d095be2745b272739e1f (diff)
downloadmatterbridge-msglm-aa274e5ab7176c83d79fd34dc6a33ba6d841bf5f.tar.gz
matterbridge-msglm-aa274e5ab7176c83d79fd34dc6a33ba6d841bf5f.tar.bz2
matterbridge-msglm-aa274e5ab7176c83d79fd34dc6a33ba6d841bf5f.zip
Update discordgo fork (#1303)
Diffstat (limited to 'vendor/github.com/matterbridge/discordgo/message.go')
-rw-r--r--vendor/github.com/matterbridge/discordgo/message.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/matterbridge/discordgo/message.go b/vendor/github.com/matterbridge/discordgo/message.go
index f4b20fee..48589388 100644
--- a/vendor/github.com/matterbridge/discordgo/message.go
+++ b/vendor/github.com/matterbridge/discordgo/message.go
@@ -150,6 +150,7 @@ type MessageSend struct {
TTS bool `json:"tts"`
Files []*File `json:"-"`
AllowedMentions *MessageAllowedMentions `json:"allowed_mentions,omitempty"`
+ Reference *MessageReference `json:"message_reference,omitempty"`
// TODO: Remove this when compatibility is not required.
File *File `json:"-"`
@@ -371,6 +372,15 @@ type MessageReference struct {
GuildID string `json:"guild_id"`
}
+// Reference returns MessageReference of given message
+func (m *Message) Reference() *MessageReference {
+ return &MessageReference{
+ GuildID: m.GuildID,
+ ChannelID: m.ChannelID,
+ MessageID: m.ID,
+ }
+}
+
// ContentWithMentionsReplaced will replace all @<id> mentions with the
// username of the mention.
func (m *Message) ContentWithMentionsReplaced() (content string) {