|
1 | 1 | --- |
2 | | -title: Sticker Sets |
| 2 | +title: Stickers and Sticker Sets |
3 | 3 | parent: /#walkthrough |
4 | 4 | walkthrough: |
5 | 5 | track: main |
6 | 6 | order: 18 |
7 | 7 | sections: |
8 | 8 | suggesting-a-slug: user |
9 | 9 | managing-added-sticker-sets: user |
| 10 | + managing-favorite-stickers: user |
| 11 | + managing-recent-stickers: user |
10 | 12 | --- |
11 | 13 |
|
12 | 14 | Clients can create, retrieve, and manage sticker sets. |
@@ -101,6 +103,42 @@ await client.unarchiveStickerSet(slug); |
101 | 103 | await client.removeStickerSet(slug); |
102 | 104 | ``` |
103 | 105 |
|
| 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 | + |
104 | 142 | ## Deleting a Sticker Set |
105 | 143 |
|
106 | 144 | Use {{ "deleteStickerSet" |> m }} to permanently delete a sticker set. |
|
0 commit comments