revokeChatInviteLink¶
Returns: ChatInviteLink
- class aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink(*, chat_id: int | str, invite_link: str, **extra_data: Any)[source]¶
Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as
aiogram.types.chat_invite_link.ChatInviteLink
object.Source: https://core.telegram.org/bots/api#revokechatinvitelink
- chat_id: int | str¶
Unique identifier of 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.
- invite_link: str¶
The invite link to revoke
Usage¶
As bot method¶
result: ChatInviteLink = await bot.revoke_chat_invite_link(...)
Method as object¶
Imports:
from aiogram.methods.revoke_chat_invite_link import RevokeChatInviteLink
alias:
from aiogram.methods import RevokeChatInviteLink
With specific bot¶
result: ChatInviteLink = await bot(RevokeChatInviteLink(...))
As reply into Webhook in handler¶
return RevokeChatInviteLink(...)