mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
Add autogenerated docs for types and methods
This commit is contained in:
parent
a24708d589
commit
65331e1fda
166 changed files with 7361 additions and 4 deletions
55
docs/api/methods/get_chat.md
Normal file
55
docs/api/methods/get_chat.md
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
# getChat
|
||||
|
||||
## Description
|
||||
|
||||
Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.
|
||||
|
||||
|
||||
## Arguments
|
||||
|
||||
| Name | Type | Description |
|
||||
| - | - | - |
|
||||
| `chat_id` | `#!python3 Union[int, str]` | Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) |
|
||||
|
||||
|
||||
|
||||
## Response
|
||||
|
||||
Type: `#!python3 Chat`
|
||||
|
||||
Description: Returns a Chat object on success.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
|
||||
```python3
|
||||
result: Chat = await bot.get_chat(...)
|
||||
```
|
||||
|
||||
### Method as object
|
||||
|
||||
Imports:
|
||||
|
||||
- `from aiogram.types import GetChat`
|
||||
- `from aiogram.api.types import GetChat`
|
||||
- `from aiogram.api.types.get_chat import GetChat`
|
||||
|
||||
|
||||
#### With specific bot
|
||||
```python3
|
||||
result: Chat = await bot.emit(GetChat(...))
|
||||
```
|
||||
|
||||
#### In handlers with current bot
|
||||
```python3
|
||||
result: Chat = await GetChat(...)
|
||||
```
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#getchat)
|
||||
- [aiogram.types.Chat](../types/chat.md)
|
||||
Loading…
Add table
Add a link
Reference in a new issue