Skip to content

Commit

Permalink
Add message forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
mlnrDev committed Apr 24, 2024
1 parent 3dacb4b commit 0ea8c17
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions discord/message.go
Expand Up @@ -102,6 +102,7 @@ type Message struct {
Type MessageType `json:"type"`
Flags MessageFlags `json:"flags"`
MessageReference *MessageReference `json:"message_reference,omitempty"`
MessageSnapshot *Message `json:"message_snapshot,omitempty"`
Interaction *MessageInteraction `json:"interaction,omitempty"`
WebhookID *snowflake.ID `json:"webhook_id,omitempty"`
Activity *MessageActivity `json:"activity,omitempty"`
Expand Down Expand Up @@ -399,12 +400,20 @@ type MessageApplication struct {

// MessageReference is a reference to another message
type MessageReference struct {
MessageID *snowflake.ID `json:"message_id"`
ChannelID *snowflake.ID `json:"channel_id,omitempty"`
GuildID *snowflake.ID `json:"guild_id,omitempty"`
FailIfNotExists bool `json:"fail_if_not_exists,omitempty"`
Type MessageReferenceType `json:"type,omitempty"`
MessageID *snowflake.ID `json:"message_id"`
ChannelID *snowflake.ID `json:"channel_id,omitempty"`
GuildID *snowflake.ID `json:"guild_id,omitempty"`
FailIfNotExists bool `json:"fail_if_not_exists,omitempty"`
}

type MessageReferenceType int

const (
MessageReferenceTypeDefault MessageReferenceType = iota
MessageReferenceTypeForward
)

// MessageInteraction is sent on the Message object when the message is a response to an interaction
type MessageInteraction struct {
ID snowflake.ID `json:"id"`
Expand Down

0 comments on commit 0ea8c17

Please sign in to comment.