File contents Build Inline Keyboard
Quick Start
Use inlineKeyboardMarkup { } or inlineKeyboardMarkup(block) to create inline keyboards. Attach via markup() or inlineKeyboardMarkup { } on send actions.
message("Choose an option:")
.inlineKeyboardMarkup {
"Option A" callback "opt_a"
"Option B" callback "opt_b"
newLine()
"Open link" url "https://example.com"
}
.send(user, bot)
Button Types
Type
Syntax
Use case
Callback
"Label" callback "data" or callbackData("Label") { "data" }
Button press sends callback to bot (1-64 bytes)
URL
"Label" url "https://..."
Opens URL when pressed
Web App
"Label" webAppInfo "https://..."
Opens Web App
Switch inline
"Label" switchInlineQuery "query"
Opens inline mode in another chat
Switch inline (current)
"Label" switchInlineQueryCurrentChat "query"
Inserts bot + query in current chat
Pay
"Pay" pay()
Payment button
Copy text
"Label" copyText "text"
Copies text to clipboard
Rows
Each url(), callbackData(), etc. adds a button to the current row
Use newLine() or br() to start a new row
inlineKeyboardMarkup {
"Yes" callback "yes"
"No" callback "no"
newLine()
"Cancel" callback "cancel"
}
Attaching to Messages
Actions with MarkupFeature (e.g. message, sendPhoto, editMessageText) support:
inlineKeyboardMarkup { ... } — builder block
markup(inlineKeyboardMarkup { ... }) — explicit markup
Callback Data Limits
1-64 bytes for callbackData
Use prefixes for routing: "action:id", "vote:123"
Reference
InlineKeyboardMarkupBuilder.kt
MarkupFeature.kt
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1 --- 2 name: vendelieu-telegram-bot-build-inline-keyboard 3 description: Build Inline Keyboard 4 --- 5 6 # Build Inline Keyboard 7 8 ## Quick Start 9 10 Use `inlineKeyboardMarkup { }` or `inlineKeyboardMarkup(block)` to create inline keyboards. Attach via `markup()` or `inlineKeyboardMarkup { }` on send actions. 11 12 ```kotlin 13 message("Choose an option:") 14 .inlineKeyboardMarkup { 15 "Option A" callback "opt_a" 16 "Option B" callback "opt_b" 17 newLine() 18 "Open link" url "https://example.com" 19 } 20 .send(user, bot) 21 ``` 22 23 ## Button Types 24 25 | Type | Syntax | Use case | 26 |------|--------|----------| 27 | Callback | `"Label" callback "data"` or `callbackData("Label") { "data" }` | Button press sends callback to bot (1-64 bytes) | 28 | URL | `"Label" url "https://..."` | Opens URL when pressed | 29 | Web App | `"Label" webAppInfo "https://..."` | Opens Web App | 30 | Switch inline | `"Label" switchInlineQuery "query"` | Opens inline mode in another chat | 31 | Switch inline (current) | `"Label" switchInlineQueryCurrentChat "query"` | Inserts bot + query in current chat | 32 | Pay | `"Pay" pay()` | Payment button | 33 | Copy text | `"Label" copyText "text"` | Copies text to clipboard | 34 35 ## Rows 36 37 - Each `url()`, `callbackData()`, etc. adds a button to the current row 38 - Use `newLine()` or `br()` to start a new row 39 40 ```kotlin 41 inlineKeyboardMarkup { 42 "Yes" callback "yes" 43 "No" callback "no" 44 newLine() 45 "Cancel" callback "cancel" 46 } 47 ``` 48 49 ## Attaching to Messages 50 51 Actions with `MarkupFeature` (e.g. `message`, `sendPhoto`, `editMessageText`) support: 52 53 - `inlineKeyboardMarkup { ... }` — builder block 54 - `markup(inlineKeyboardMarkup { ... })` — explicit markup 55 56 ## Callback Data Limits 57 58 - 1-64 bytes for `callbackData` 59 - Use prefixes for routing: `"action:id"`, `"vote:123"` 60 61 ## Reference 62 63 - [InlineKeyboardMarkupBuilder.kt](telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/builders/InlineKeyboardMarkupBuilder.kt) 64 - [MarkupFeature.kt](telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/features/MarkupFeature.kt) 65 66 --- 67 > Converted and distributed by [TomeVault](https://tomevault.io/claim/vendelieu) — claim your Tome and manage your conversions. 68 <!-- tomevault:4.0:skill_md:2026-04-11 -->
tomevault-io/skills-registry/tree/main/vendelieu--telegram-bot--build-inline-keyboard commit 60c6a48e49
Frequently asked questions How do I install the Vendelieu Telegram Bot Build Inline Keyboard skill? Run npx skillmds@latest add tomevault-io/vendelieu-telegram-bot-build-inline-keyboard in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Vendelieu Telegram Bot Build Inline Keyboard skill do? Build Inline Keyboard It is listed under Coding & Dev Tools on SkillMD.
Is Vendelieu Telegram Bot Build Inline Keyboard safe to use? This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Vendelieu Telegram Bot Build Inline Keyboard? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Vendelieu Telegram Bot Build Inline Keyboard free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Vendelieu Telegram Bot Build Inline Keyboard? tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.