Skip to content

Commit

Permalink
Add MentionChannel (#331)
Browse files Browse the repository at this point in the history
so crossposted messages can actually unmarshal :-)
  • Loading branch information
cane authored Feb 1, 2024
1 parent d55469b commit 05893c6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion discord/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ type Message struct {
Mentions []User `json:"mentions"`
MentionEveryone bool `json:"mention_everyone"`
MentionRoles []snowflake.ID `json:"mention_roles"`
MentionChannels []Channel `json:"mention_channels"`
MentionChannels []MentionChannel `json:"mention_channels"`
Pinned bool `json:"pinned"`
EditedTimestamp *time.Time `json:"edited_timestamp"`
Author User `json:"author"`
Expand Down Expand Up @@ -335,6 +335,13 @@ func (m Message) JumpURL() string {
return fmt.Sprintf(MessageURLFmt, guildID, m.ChannelID, m.ID) // duplicate code, but there isn't a better way without sacrificing user convenience
}

type MentionChannel struct {
ID snowflake.ID `json:"id"`
GuildID snowflake.ID `json:"guild_id"`
Type ChannelType `json:"type"`
Name string `json:"name"`
}

type MessageThread struct {
GuildThread
Member ThreadMember `json:"member"`
Expand Down

0 comments on commit 05893c6

Please sign in to comment.