From ae665d6baa7de4b38791ec0c04147c79611a0f10 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Sat, 10 Feb 2024 22:50:42 +0100 Subject: [PATCH] fix(message): stickers are partial only --- message.go | 2 +- structs.go | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/message.go b/message.go index 41c1df7db..c6eaf2620 100644 --- a/message.go +++ b/message.go @@ -149,7 +149,7 @@ type Message struct { Thread *Channel `json:"thread,omitempty"` // An array of Sticker objects, if any were sent. - StickerItems []*Sticker `json:"sticker_items"` + StickerItems []*StickerItem `json:"sticker_items"` } // UnmarshalJSON is a helper function to unmarshal the Message. diff --git a/structs.go b/structs.go index 6d3b4fb6d..fb7e1ff62 100644 --- a/structs.go +++ b/structs.go @@ -656,6 +656,13 @@ type Sticker struct { SortValue int `json:"sort_value"` } +// StickerItem represents the smallest amount of data required to render a sticker. A partial sticker object. +type StickerItem struct { + ID string `json:"id"` + Name string `json:"name"` + FormatType StickerFormat `json:"format_type"` +} + // StickerPack represents a pack of standard stickers. type StickerPack struct { ID string `json:"id"`