From 8d57fbba5a1e85fb9e33e9de6ab3c2fd7fd8bc24 Mon Sep 17 00:00:00 2001 From: Jason Mansfield Date: Sun, 24 Nov 2024 15:15:36 -0800 Subject: [PATCH 1/2] Fix incorrect EventSubChannelChatMessageEvent parsing --- eventsub.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eventsub.go b/eventsub.go index fd0ec65..767f6c7 100644 --- a/eventsub.go +++ b/eventsub.go @@ -296,7 +296,7 @@ type EventSubChannelChatMessageEvent struct { type EventSubChatMessage struct { Text string `json:"text"` - Fragments []EventSubChatMessageFragment `json:"fragment"` + Fragments []EventSubChatMessageFragment `json:"fragments"` } type EventSubChatMessageReply struct { @@ -354,10 +354,10 @@ type EventSubChatMessageCheermote struct { } type EventSubChatMessageEmote struct { - ID string `json:"id"` - EmoteSetID string `json:"emote_set_id"` - OwnerID string `json:"owner_id"` - Format string `json:"format"` + ID string `json:"id"` + EmoteSetID string `json:"emote_set_id"` + OwnerID string `json:"owner_id"` + Format []string `json:"format"` } type EventSubChatMessageMention struct { From c61f60d7de392760c0d93584458ac0304127f889 Mon Sep 17 00:00:00 2001 From: Jason Mansfield Date: Sun, 24 Nov 2024 15:19:47 -0800 Subject: [PATCH 2/2] fix additional reference --- eventsub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eventsub.go b/eventsub.go index 767f6c7..3526078 100644 --- a/eventsub.go +++ b/eventsub.go @@ -508,7 +508,7 @@ type EventSubChannelChatNotificationBitsBadgeTier struct { type EventSubChatNotificationMessage struct { Text string `json:"text"` - Fragments []EventSubChatMessageFragment `json:"fragment"` + Fragments []EventSubChatMessageFragment `json:"fragments"` } // Data for a channel poll begin event