getChat¶
Returns: ChatFullInfo
- class aiogram.methods.get_chat.GetChat(*, chat_id: int | str, **extra_data: Any)[source]¶
Use this method to get up-to-date information about the chat. Returns a
aiogram.types.chat_full_info.ChatFullInfo
object on success.Source: https://core.telegram.org/bots/api#getchat
- chat_id: int | str¶
Unique identifier for the target chat or username of the target supergroup or channel (in the format
@channelusername
)
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_post_init(context: Any, /) None ¶
We need to both initialize private attributes and call the user-defined model_post_init method.
Usage¶
As bot method¶
result: ChatFullInfo = await bot.get_chat(...)
Method as object¶
Imports:
from aiogram.methods.get_chat import GetChat
alias:
from aiogram.methods import GetChat
With specific bot¶
result: ChatFullInfo = await bot(GetChat(...))