rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.77k stars 1.22k forks source link

/delete #318

Closed iatomatt closed 7 years ago

iatomatt commented 7 years ago

Hi! My code is:

SendSticker sticker = new SendSticker();
sticker
    .setChatId(chat_id)
    .setSticker("AAQCABNQBBAOAAT5KuJRo0p48iiJAAIC");
try {
    execute(sticker); //here is mistake
}catch (TelegramApiException e) {
    e.printStackTrace();
}

in line execute(sticker); i've got a mistake:

execute (Method) in AbsSender cannot be applied to (org.telegram.telegrambots.api.methods.send.SendSticker)

reason: no instance(s) of type variable(s) T exist so that SendSticker conforms to BotApiMethod

How can i fix it? Thx!

iatomatt commented 7 years ago

Ок, i find solution. I need too use sendSticker method.

Clevero commented 7 years ago

@iatomatt your problem is solved, right? Then please close this issue^^