Functions
delete-my-commands
fn (request: DeleteMyCommandsRequest): Bool
fn (request: DeleteMyCommandsRequest, opts: Map): Bool
deleteMyCommands - Delete the bot's command list for the given scope and language.
get-me
fn (): Map
fn (opts: Map): Map
getMe - Get basic information about the bot. Returns the bot's id, username, first_name, and capabilities.
Example
::bot ::telegram::bot
response ::bot/get-me()
response.id // => 123456789
response.username // => "my_hot_bot"
response.first_name // => "Hot Bot"
response.is_bot // => true
get-my-commands
fn (request: GetMyCommandsRequest): Vec<Map>
fn (request: GetMyCommandsRequest, opts: Map): Vec<Map>
getMyCommands - Get the bot's command list. scope filters by context (e.g. {type: "all_private_chats"} or {type: "chat", chat_id: 123}).
Example
::bot ::telegram::bot
commands ::bot/get-my-commands(::bot/GetMyCommandsRequest({}))
// => [{command: "start", description: "Start the bot"}, {command: "help", description: "Show help"}]
get-my-description
fn (request: GetMyDescriptionRequest): Map
fn (request: GetMyDescriptionRequest, opts: Map): Map
getMyDescription - Get the bot's description (shown on the bot's profile and share page).
get-my-name
fn (request: GetMyNameRequest): Map
fn (request: GetMyNameRequest, opts: Map): Map
getMyName - Get the bot's name for the given language. Returns {name: "Bot Name"}.
get-my-short-description
fn (request: GetMyShortDescriptionRequest): Map
fn (request: GetMyShortDescriptionRequest, opts: Map): Map
getMyShortDescription - Get the bot's short description (shown on the start screen).
set-my-commands
fn (request: SetMyCommandsRequest): Bool
fn (request: SetMyCommandsRequest, opts: Map): Bool
setMyCommands - Set the bot's command list. Each command is {command: "name", description: "What it does"}. Max 100 commands.
Example
::bot ::telegram::bot
::bot/set-my-commands(::bot/SetMyCommandsRequest({
commands: [
{command: "start", description: "Start the bot"},
{command: "help", description: "Show help"},
{command: "status", description: "Check system status"}
]
}))
set-my-description
fn (request: SetMyDescriptionRequest): Bool
fn (request: SetMyDescriptionRequest, opts: Map): Bool
setMyDescription - Change the bot's description. Max 512 characters. Shown on the bot's profile page.
set-my-name
fn (request: SetMyNameRequest): Bool
fn (request: SetMyNameRequest, opts: Map): Bool
setMyName - Change the bot's name. Max 64 characters.
set-my-short-description
fn (request: SetMyShortDescriptionRequest): Bool
fn (request: SetMyShortDescriptionRequest, opts: Map): Bool
setMyShortDescription - Change the bot's short description. Max 120 characters. Shown when users open a chat with the bot.
Types
DeleteMyCommandsRequest
DeleteMyCommandsRequest type {
scope: Map?,
language_code: Str?
}
GetMyCommandsRequest
GetMyCommandsRequest type {
scope: Map?,
language_code: Str?
}
GetMyDescriptionRequest
GetMyDescriptionRequest type {
language_code: Str?
}
GetMyNameRequest
GetMyNameRequest type {
language_code: Str?
}
GetMyShortDescriptionRequest
GetMyShortDescriptionRequest type {
language_code: Str?
}
SetMyCommandsRequest
SetMyCommandsRequest type {
commands: Vec<Map>,
scope: Map?,
language_code: Str?
}
SetMyDescriptionRequest
SetMyDescriptionRequest type {
description: Str?,
language_code: Str?
}
SetMyNameRequest
SetMyNameRequest type {
name: Str?,
language_code: Str?
}
SetMyShortDescriptionRequest
SetMyShortDescriptionRequest type {
short_description: Str?,
language_code: Str?
}