Skip to content

Commit c638831

Browse files
caneapricotbucket28
authored andcommitted
Add MentionChannel (disgoorg#331)
so crossposted messages can actually unmarshal :-)
1 parent 1cbcfd5 commit c638831

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

discord/message.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ type Message struct {
9292
Mentions []User `json:"mentions"`
9393
MentionEveryone bool `json:"mention_everyone"`
9494
MentionRoles []snowflake.ID `json:"mention_roles"`
95-
MentionChannels []Channel `json:"mention_channels"`
95+
MentionChannels []MentionChannel `json:"mention_channels"`
9696
Pinned bool `json:"pinned"`
9797
EditedTimestamp *time.Time `json:"edited_timestamp"`
9898
Author User `json:"author"`
@@ -335,6 +335,13 @@ func (m Message) JumpURL() string {
335335
return fmt.Sprintf(MessageURLFmt, guildID, m.ChannelID, m.ID) // duplicate code, but there isn't a better way without sacrificing user convenience
336336
}
337337

338+
type MentionChannel struct {
339+
ID snowflake.ID `json:"id"`
340+
GuildID snowflake.ID `json:"guild_id"`
341+
Type ChannelType `json:"type"`
342+
Name string `json:"name"`
343+
}
344+
338345
type MessageThread struct {
339346
GuildThread
340347
Member ThreadMember `json:"member"`

0 commit comments

Comments
 (0)