mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 18:01:04 +00:00
Add support of Bot API 4.7. Bump version
This commit is contained in:
parent
4cb9697cb4
commit
33003f2026
167 changed files with 996 additions and 504 deletions
48
docs/api/methods/get_my_commands.md
Normal file
48
docs/api/methods/get_my_commands.md
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# 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
|
||||
|
||||
```python3
|
||||
result: List[BotCommand] = await bot.get_my_commands(...)
|
||||
```
|
||||
|
||||
### Method as object
|
||||
|
||||
Imports:
|
||||
|
||||
- `from aiogram.methods import GetMyCommands`
|
||||
- `from aiogram.api.methods import GetMyCommands`
|
||||
- `from aiogram.api.methods.get_my_commands import GetMyCommands`
|
||||
|
||||
#### In handlers with current bot
|
||||
```python3
|
||||
result: List[BotCommand] = await GetMyCommands(...)
|
||||
```
|
||||
|
||||
#### With specific bot
|
||||
```python3
|
||||
result: List[BotCommand] = await bot(GetMyCommands(...))
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#getmycommands)
|
||||
- [aiogram.types.BotCommand](../types/bot_command.md)
|
||||
Loading…
Add table
Add a link
Reference in a new issue