Skip to content

setMyCommands

Returns boolean

Use this method to change the list of the bot’s commands. See this manual for more details about bot commands.

Required: commands · Optional: 2 parameters

Try it
Token saved
Response

TypeScript example · @effect-ak/tg-bot-client
import { makeTgBotClient } from "@effect-ak/tg-bot-client"
const client = makeTgBotClient({ bot_token: "YOUR_BOT_TOKEN" })
const result = await client.execute("set_my_commands", {
commands: []
})

Parameters

commands BotCommand[] Required
A JSON-serialized list of bot commands to be set as the list of the bot’s commands. At most 100 commands can be specified.

scope BotCommandScope
A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.

language_code string
A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands.

setBusinessAccountBio · setBusinessAccountGiftSettings · setBusinessAccountName · setBusinessAccountProfilePhoto · setBusinessAccountUsername · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setCustomEmojiStickerSetThumbnail · setGameScore · setMessageReaction · setMyDefaultAdministratorRights · setMyDescription · setMyName · setMyProfilePhoto · setMyShortDescription · setPassportDataErrors · setStickerEmojiList · setStickerKeywords · setStickerMaskPosition · setStickerPositionInSet · setStickerSetThumbnail · setStickerSetTitle · setUserEmojiStatus · setWebhook