Skip to content

Commit

Permalink
Add Type to EventMessageReactionAdd/Remove
Browse files Browse the repository at this point in the history
  • Loading branch information
sebm253 committed May 16, 2024
1 parent fbf9a5d commit 9356c13
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions gateway/gateway_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,16 @@ func (EventGuildAuditLogEntryCreate) messageData() {}
func (EventGuildAuditLogEntryCreate) eventData() {}

type EventMessageReactionAdd struct {
UserID snowflake.ID `json:"user_id"`
ChannelID snowflake.ID `json:"channel_id"`
MessageID snowflake.ID `json:"message_id"`
GuildID *snowflake.ID `json:"guild_id"`
Member *discord.Member `json:"member"`
Emoji discord.PartialEmoji `json:"emoji"`
MessageAuthorID *snowflake.ID `json:"message_author_id"`
BurstColors []string `json:"burst_colors"`
Burst bool `json:"burst"`
UserID snowflake.ID `json:"user_id"`
ChannelID snowflake.ID `json:"channel_id"`
MessageID snowflake.ID `json:"message_id"`
GuildID *snowflake.ID `json:"guild_id"`
Member *discord.Member `json:"member"`
Emoji discord.PartialEmoji `json:"emoji"`
MessageAuthorID *snowflake.ID `json:"message_author_id"`
BurstColors []string `json:"burst_colors"`
Burst bool `json:"burst"`
Type discord.MessageReactionType `json:"type"`
}

func (e *EventMessageReactionAdd) UnmarshalJSON(data []byte) error {
Expand All @@ -215,13 +216,14 @@ func (EventMessageReactionAdd) messageData() {}
func (EventMessageReactionAdd) eventData() {}

type EventMessageReactionRemove struct {
UserID snowflake.ID `json:"user_id"`
ChannelID snowflake.ID `json:"channel_id"`
MessageID snowflake.ID `json:"message_id"`
GuildID *snowflake.ID `json:"guild_id"`
Emoji discord.PartialEmoji `json:"emoji"`
BurstColors []string `json:"burst_colors"`
Burst bool `json:"burst"`
UserID snowflake.ID `json:"user_id"`
ChannelID snowflake.ID `json:"channel_id"`
MessageID snowflake.ID `json:"message_id"`
GuildID *snowflake.ID `json:"guild_id"`
Emoji discord.PartialEmoji `json:"emoji"`
BurstColors []string `json:"burst_colors"`
Burst bool `json:"burst"`
Type discord.MessageReactionType `json:"type"`
}

func (EventMessageReactionRemove) messageData() {}
Expand Down

1 comment on commit 9356c13

@sebm253
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.