mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2026-05-08 01:20:05 +00:00
1.2 KiB
1.2 KiB
InlineQueriesBot
A multiplatform bot that answers inline queries with paginated article results.
Functionality
Responds to inline queries by returning a page of article results. Each result includes a description and a deep-link button. Navigation between pages is handled via the query offset (next/previous buttons encoded in the result set).
Arguments
| Position | Value | Description |
|---|---|---|
| 1 | BOT_TOKEN |
Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|---|---|
debug |
Enable verbose debug logging |
testServer |
Connect to the Telegram test server instead of production |
Bot Commands
None. The bot is driven by inline queries (type @BotUsername in any chat).
Capabilities
- Answers inline queries with
InlineQueryResultArticleitems - Offset-based pagination: each result page encodes the next-page offset in the answer
- Each result includes a deep-link
InlineKeyboardButtonback to the bot - Multiplatform module with a shared
commonMainimplementation and a JVM launcher entry point - Requires Inline Mode to be enabled in BotFather settings
- Runs via long polling
Launch
../gradlew run --args="BOT_TOKEN"