Use this method to unban a previously kicked user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. Returns True on success.
||Unique identifier for the target group or username of the target supergroup or channel (in the format @username)|
||Unique identifier of the target user|
Description: The user will not return to the group or channel automatically, but will be able to join via link, etc. Returns True on success.
As bot method¶
result: bool = await bot.unban_chat_member(...)
Method as object¶
from aiogram.methods import UnbanChatMember
from aiogram.api.methods import UnbanChatMember
from aiogram.api.methods.unban_chat_member import UnbanChatMember
In handlers with current bot¶
result: bool = await UnbanChatMember(...)
With specific bot¶
result: bool = await bot(UnbanChatMember(...))
As reply into Webhook in handler¶