unbanChatSenderChat¶
Returns: bool
- class aiogram.methods.unban_chat_sender_chat.UnbanChatSenderChat(*, chat_id: int | str, sender_chat_id: int, **extra_data: Any)[source]¶
Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns
True
on success.Source: https://core.telegram.org/bots/api#unbanchatsenderchat
- chat_id: int | str¶
Unique identifier for the target chat or username of the target 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.
- sender_chat_id: int¶
Unique identifier of the target sender chat
Usage¶
As bot method¶
result: bool = await bot.unban_chat_sender_chat(...)
Method as object¶
Imports:
from aiogram.methods.unban_chat_sender_chat import UnbanChatSenderChat
alias:
from aiogram.methods import UnbanChatSenderChat
With specific bot¶
result: bool = await bot(UnbanChatSenderChat(...))
As reply into Webhook in handler¶
return UnbanChatSenderChat(...)