From 23df4329d644d50be6b670abcea226df516e7a2d Mon Sep 17 00:00:00 2001 From: Ash Keel Date: Thu, 29 Feb 2024 20:44:39 +0100 Subject: [PATCH] fix chat message structure --- eventsub.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/eventsub.go b/eventsub.go index 69bcf70..befc9e9 100644 --- a/eventsub.go +++ b/eventsub.go @@ -278,25 +278,25 @@ type EventSubChannelChatClearUserMessagesEvent struct { // Data for a chat message type EventSubChannelChatMessageEvent struct { - BroadcasterUserID string `json:"broadcaster_user_id"` - BroadcasterUserLogin string `json:"broadcaster_user_login"` - BroadcasterUserName string `json:"broadcaster_user_name"` - ChatterUserID string `json:"chatter_user_id"` - ChatterUserLogin string `json:"chatter_user_login"` - ChatterUserName string `json:"chatter_user_name"` - MessageID string `json:"message_id"` - Message EventSubChatMessage `json:"message"` + BroadcasterUserID string `json:"broadcaster_user_id"` + BroadcasterUserLogin string `json:"broadcaster_user_login"` + BroadcasterUserName string `json:"broadcaster_user_name"` + ChatterUserID string `json:"chatter_user_id"` + ChatterUserLogin string `json:"chatter_user_login"` + ChatterUserName string `json:"chatter_user_name"` + MessageID string `json:"message_id"` + Message EventSubChatMessage `json:"message"` + MessageType EventSubChatMessageType `json:"message_type"` + Badges []EventSubChatBadge `json:"badges"` + Cheer EventSubChatMessageCheer `json:"cheer"` + Color string `json:"color"` + Reply EventSubChatMessageReply `json:"reply"` + ChannelPointsCustomRewardID string `json:"channel_points_custom_reward_id"` } type EventSubChatMessage struct { - Text string `json:"text"` - Fragments []EventSubChatMessageFragment `json:"fragment"` - MessageType EventSubChatMessageType `json:"message_type"` - Badges []EventSubChatBadge `json:"badges"` - Cheer EventSubChatMessageCheer `json:"cheer"` - Color string `json:"color"` - Reply EventSubChatMessageReply `json:"reply"` - ChannelPointsCustomRewardID string `json:"channel_points_custom_reward_id"` + Text string `json:"text"` + Fragments []EventSubChatMessageFragment `json:"fragment"` } type EventSubChatMessageReply struct {