@@ -102,6 +102,7 @@ type Message struct {
102
102
Type MessageType `json:"type"`
103
103
Flags MessageFlags `json:"flags"`
104
104
MessageReference * MessageReference `json:"message_reference,omitempty"`
105
+ MessageSnapshots []MessageSnapshot `json:"message_snapshots,omitempty"`
105
106
Interaction * MessageInteraction `json:"interaction,omitempty"`
106
107
WebhookID * snowflake.ID `json:"webhook_id,omitempty"`
107
108
Activity * MessageActivity `json:"activity,omitempty"`
@@ -407,10 +408,34 @@ type MessageApplication struct {
407
408
408
409
// MessageReference is a reference to another message
409
410
type MessageReference struct {
410
- MessageID * snowflake.ID `json:"message_id"`
411
- ChannelID * snowflake.ID `json:"channel_id,omitempty"`
412
- GuildID * snowflake.ID `json:"guild_id,omitempty"`
413
- FailIfNotExists bool `json:"fail_if_not_exists,omitempty"`
411
+ Type MessageReferenceType `json:"type,omitempty"`
412
+ MessageID * snowflake.ID `json:"message_id"`
413
+ ChannelID * snowflake.ID `json:"channel_id,omitempty"`
414
+ GuildID * snowflake.ID `json:"guild_id,omitempty"`
415
+ FailIfNotExists bool `json:"fail_if_not_exists,omitempty"`
416
+ }
417
+
418
+ type MessageReferenceType int
419
+
420
+ const (
421
+ MessageReferenceTypeDefault MessageReferenceType = iota
422
+ MessageReferenceTypeForward
423
+ )
424
+
425
+ type MessageSnapshot struct {
426
+ Message PartialMessage `json:"message"`
427
+ }
428
+
429
+ type PartialMessage struct {
430
+ Type MessageType `json:"type"`
431
+ Content string `json:"content,omitempty"`
432
+ Embeds []Embed `json:"embeds,omitempty"`
433
+ Attachments []Attachment `json:"attachments"`
434
+ CreatedAt time.Time `json:"timestamp"`
435
+ EditedTimestamp * time.Time `json:"edited_timestamp"`
436
+ Flags MessageFlags `json:"flags"`
437
+ Mentions []User `json:"mentions"`
438
+ MentionRoles []snowflake.ID `json:"mention_roles"`
414
439
}
415
440
416
441
// MessageInteraction is sent on the Message object when the message is a response to an interaction
0 commit comments