Skip to content

Commit

Permalink
Add note to CreatedAt about its population
Browse files Browse the repository at this point in the history
  • Loading branch information
sebm253 committed May 10, 2024
1 parent 7bb8e17 commit 1d47f18
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions discord/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,14 @@ func MessageURL(guildID snowflake.ID, channelID snowflake.ID, messageID snowflak

// Message is a struct for messages sent in discord text-based channels
type Message struct {
ID snowflake.ID `json:"id"`
GuildID *snowflake.ID `json:"guild_id"`
Reactions []MessageReaction `json:"reactions"`
Attachments []Attachment `json:"attachments"`
TTS bool `json:"tts"`
Embeds []Embed `json:"embeds,omitempty"`
Components []ContainerComponent `json:"components,omitempty"`
ID snowflake.ID `json:"id"`
GuildID *snowflake.ID `json:"guild_id"`
Reactions []MessageReaction `json:"reactions"`
Attachments []Attachment `json:"attachments"`
TTS bool `json:"tts"`
Embeds []Embed `json:"embeds,omitempty"`
Components []ContainerComponent `json:"components,omitempty"`
// Note: for message update events, this field is populated by the creation of the ID during unmarshalling
CreatedAt time.Time `json:"timestamp"`
Mentions []User `json:"mentions"`
MentionEveryone bool `json:"mention_everyone"`
Expand Down

0 comments on commit 1d47f18

Please sign in to comment.