Class CallbackQueryResponseSender

java.lang.Object
io.github.yvasyliev.telegramforwarderbot.aspect.CallbackQueryResponseSender

@Component public class CallbackQueryResponseSender extends Object
Aspect for sending responses to callback queries in Telegram. It answers the callback query with a predefined text based on the command.
  • Constructor Details

    • CallbackQueryResponseSender

      public CallbackQueryResponseSender()
  • Method Details

    • answerCallbackQuery

      public void answerCallbackQuery(org.telegram.telegrambots.meta.api.objects.CallbackQuery callbackQuery, AbstractCommandCallbackDataDTO callbackData) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException
      Sends an answer to a callback query.
      Parameters:
      callbackQuery - the callback query to answer
      callbackData - the data associated with the callback command
      Throws:
      org.telegram.telegrambots.meta.exceptions.TelegramApiException - if there is an error sending the answer