Skip to content

OnCallbackQuery

annotation Tourmaline::Annotations::OnCallbackQuery #

Add a callback query handler which optionally listens for a specific data value.

Options:

pattern
A String or Regex which the data must match.

Example:

@[OnCallbackQuery("back")]
def back_button_pressed(client, update)
  query = update.callback_query.not_nil!
  query.answer("You pressed back!")
end