Send a response for a callback query.
Send a response for a callback query. Callback queries must ack-ed e.g. ackCallback(), even if no response is sent.
Text of the notification. If not specified, nothing will be shown to the user
If true, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.
URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game - note that this will only work if the query comes from a callback_game button.
The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.
A future containing the result of the AnswerCallbackQuery request.
Allowed updates.
Allowed updates. See UpdateType.Filters. By default all updates are allowed.
Allowed updates. None
indicates no-filtering (all updates allowed).
import UpdateType.Filters._ override def allowedUpdates: Option[Seq[UpdateType]] = Some(MessageUpdates ++ InlineUpdates)
Use this method to send answers to an inline query.
Use this method to send answers to an inline query. On success, True is returned. No more than 50 results per query are allowed.
Array of InlineQueryResult A JSON-serialized array of results for the inline query
Integer Optional The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.
Boolean Optional Pass True, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query
String Optional Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.
String Optional If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter switch_pm_parameter
String Optional Parameter for the start message sent to the bot when user presses the switch buttonExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.
Executes 'action' for every incoming callback query.
Executes 'action' for every incoming callback query.
Filter callbacks based on a tag (to avoid collision).
Filter callbacks based on a tag (to avoid collision). The tag is stripped from the CallbackQuery object when passed to the handler.
Tag
Handler to process the filtered callback query.
Executes action
for every channel post.
Executes action
for every channel post.
Executes 'action' for every inline result.
Executes 'action' for every inline result. * See https://core.telegram.org/bots/inline#collecting-feedback
Executes action
for every incoming edited channel post.
Executes action
for every incoming edited channel post.
Executes action
for every incoming edited message event.
Executes action
for every incoming edited message event.
Executes 'action' for every inline query.
Executes 'action' for every inline query.
Executes action
for every incoming message.
Executes action
for every incoming message.
Executes 'action' for every pre-checkout query.
Executes 'action' for every pre-checkout query.
Executes 'action' for every shipping query.
Executes 'action' for every shipping query.
Executes action
for every update.
Executes action
for every update.
Helper to tag 'callbackData' in inline markups.
Helper to tag 'callbackData' in inline markups. Usage:
def tag = prefixTag("MY_TAG") _ ... callbackData = tag("some data")
Dispatch updates to specialized handlers.
Sends text replies.
Sends text replies. Supports Markdown/HTML formatting and markups.
Note:
Only the tags mentioned above are currently supported. Tags must not be nested. All <, > and & symbols that are not a part of a tag or an HTML entity must be replaced with the corresponding HTML entities (< with <, > with > and & with &). All numerical HTML entities are supported. The API currently supports only the following named HTML entities: <, >, & and ".
Text of the message to be sent
Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.
Optional Disables link previews for links in this message
Optional Sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
Optional If the message is a reply, ID of the original message
com.bot4s.telegram.models.InlineKeyboardMarkup or com.bot4s.telegram.models.ReplyKeyboardMarkup or com.bot4s.telegram.models.ReplyKeyboardRemove or com.bot4s.telegram.models.ForceReply Optional Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to hide reply keyboard or to force a reply from the user.
Sends text replies in Markdown format.
Sends text replies in Markdown format.
Text of the message to be sent
Optional Disables link previews for links in this message
Optional Sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
Optional If the message is a reply, ID of the original message
models.InlineKeyboardMarkup or models.ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply Optional Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to hide reply keyboard or to force a reply from the user.
Generic extractor for messages.
Generic extractor for messages.
onCommand('hello) { implicit msg => using(_.from) { user => reply(s"Hello ${user.firstName}!") } }
Declarative interface.