feat(message)!: use partial sticker objects (#1494)

This commit is contained in:
Earlopain 2024-02-26 12:13:17 +01:00 committed by GitHub
parent bb405daf68
commit c3f22cb8ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -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.

View file

@ -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"`