mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 18:01:04 +00:00
916 B
916 B
getMyCommands
Description
Use this method to get the current list of the bot's commands. Requires no parameters. Returns Array of BotCommand on success.
Response
Type: #!python3 List[BotCommand]
Description: Returns Array of BotCommand on success.
Usage
As bot method
result: List[BotCommand] = await bot.get_my_commands(...)
Method as object
Imports:
from aiogram.methods import GetMyCommandsfrom aiogram.api.methods import GetMyCommandsfrom aiogram.api.methods.get_my_commands import GetMyCommands
In handlers with current bot
result: List[BotCommand] = await GetMyCommands(...)
With specific bot
result: List[BotCommand] = await bot(GetMyCommands(...))