|
156 | 156 | import com.pengrad.telegrambot.request.SetGameScore; |
157 | 157 | import com.pengrad.telegrambot.request.SetMyCommands; |
158 | 158 | import com.pengrad.telegrambot.request.SetStickerPositionInSet; |
| 159 | +import com.pengrad.telegrambot.request.SetStickerSetThumb; |
159 | 160 | import com.pengrad.telegrambot.request.SetWebhook; |
160 | 161 | import com.pengrad.telegrambot.request.StopMessageLiveLocation; |
161 | 162 | import com.pengrad.telegrambot.request.StopPoll; |
@@ -296,6 +297,7 @@ public static TelegramBot createTestBot() { |
296 | 297 | static String gifFileId = "CgADAgADfQADgNqgSTt9SzatJhc3FgQ"; |
297 | 298 | static String withSpaceFileId = "BAADAgADZwADkg-4SQI5WM0SPNHrAg"; |
298 | 299 | static String stickerSet = "testset_by_pengrad_test_bot"; |
| 300 | + static String stickerSetAnim = "testset_anim_by_pengrad_test_bot"; |
299 | 301 | static String imageUrl = "https://telegram.org/img/t_logo.png"; |
300 | 302 | static File thumbFile = resourcePath.resolve("thumb.jpg").toFile(); |
301 | 303 | static byte[] thumbBytes; |
@@ -1389,6 +1391,17 @@ public void deleteStickerFromSet() { |
1389 | 1391 | } |
1390 | 1392 | } |
1391 | 1393 |
|
| 1394 | + @Test |
| 1395 | + public void setStickerSetThumb() { |
| 1396 | + String thumbFile = "CAACAgIAAxkBAAJ0ll6DO4bNCynpfZmS6g-YcGY2zrP5AAIBAAPANk8TGC5zMKs_LVEYBA"; |
| 1397 | + BaseResponse response = bot.execute(new SetStickerSetThumb(stickerSetAnim, chatId, thumbFile)); |
| 1398 | + assertTrue(response.isOk()); |
| 1399 | + |
| 1400 | + // clear thumb by not sending it |
| 1401 | + response = bot.execute(new SetStickerSetThumb(stickerSetAnim, chatId)); |
| 1402 | + assertTrue(response.isOk()); |
| 1403 | + } |
| 1404 | + |
1392 | 1405 | @Test |
1393 | 1406 | public void editMessageLiveLocation() { |
1394 | 1407 | BaseResponse response = bot.execute(new EditMessageLiveLocation(chatId, 10009, 21, 105) |
|
0 commit comments