diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/stickers/SetStickerSetThumb.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/stickers/SetStickerSetThumb.java index 62836002..c37e74fa 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/stickers/SetStickerSetThumb.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/stickers/SetStickerSetThumb.java @@ -31,7 +31,7 @@ import java.io.IOException; @AllArgsConstructor @Builder public class SetStickerSetThumb extends BotApiMethod { - private static final String PATH = "setStickerSetThumb"; + public static final String PATH = "setStickerSetThumb"; public static final String NAME_FIELD = "name"; public static final String USERID_FIELD = "user_id"; diff --git a/telegrambots/src/main/java/org/telegram/telegrambots/bots/DefaultAbsSender.java b/telegrambots/src/main/java/org/telegram/telegrambots/bots/DefaultAbsSender.java index 3d173e4f..4a2ebbca 100644 --- a/telegrambots/src/main/java/org/telegram/telegrambots/bots/DefaultAbsSender.java +++ b/telegrambots/src/main/java/org/telegram/telegrambots/bots/DefaultAbsSender.java @@ -610,7 +610,7 @@ public abstract class DefaultAbsSender extends AbsSender { assertParamNotNull(setStickerSetThumb, "setStickerSetThumb"); setStickerSetThumb.validate(); try { - String url = getBaseUrl() + AddStickerToSet.PATH; + String url = getBaseUrl() + SetStickerSetThumb.PATH; HttpPost httppost = configuredHttpPost(url); MultipartEntityBuilder builder = MultipartEntityBuilder.create(); builder.setLaxMode(); @@ -623,7 +623,7 @@ public abstract class DefaultAbsSender extends AbsSender { return setStickerSetThumb.deserializeResponse(sendHttpPostRequest(httppost)); } catch (IOException e) { - throw new TelegramApiException("Unable to add sticker to set", e); + throw new TelegramApiException("Unable to set sticker set thumb", e); } }