Skip to content

Commit 274b5a6

Browse files
committed
Extend Sticker Sets
1 parent efc7e54 commit 274b5a6

1 file changed

Lines changed: 39 additions & 1 deletion

File tree

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
---
2-
title: Sticker Sets
2+
title: Stickers and Sticker Sets
33
parent: /#walkthrough
44
walkthrough:
55
track: main
66
order: 18
77
sections:
88
suggesting-a-slug: user
99
managing-added-sticker-sets: user
10+
managing-favorite-stickers: user
11+
managing-recent-stickers: user
1012
---
1113

1214
Clients can create, retrieve, and manage sticker sets.
@@ -101,6 +103,42 @@ await client.unarchiveStickerSet(slug);
101103
await client.removeStickerSet(slug);
102104
```
103105

106+
## Managing Favorite Stickers
107+
108+
User clients can list favorite stickers with {{ "getFavoriteStickers" |> m }}.
109+
110+
```ts
111+
const favoriteStickers = await client.getFavoriteStickers();
112+
```
113+
114+
Use {{ "addStickerToFavorites" |> m }} and {{ "removeStickerFromFavorites" |> m }} with a sticker's file identifier to update the list.
115+
116+
```ts
117+
await client.addStickerToFavorites(sticker.fileId);
118+
await client.removeStickerFromFavorites(sticker.fileId);
119+
```
120+
121+
## Managing Recent Stickers
122+
123+
User clients can list recent stickers with {{ "getRecentStickers" |> m }}.
124+
125+
```ts
126+
const recentStickers = await client.getRecentStickers();
127+
```
128+
129+
Use {{ "addStickerToRecents" |> m }} and {{ "removeStickerFromRecents" |> m }} with a sticker's file identifier to update the list.
130+
131+
```ts
132+
await client.addStickerToRecents(sticker.fileId);
133+
await client.removeStickerFromRecents(sticker.fileId);
134+
```
135+
136+
Use {{ "clearRecentStickers" |> m }} to remove every sticker from the recent list.
137+
138+
```ts
139+
await client.clearRecentStickers();
140+
```
141+
104142
## Deleting a Sticker Set
105143

106144
Use {{ "deleteStickerSet" |> m }} to permanently delete a sticker set.

0 commit comments

Comments
 (0)