createChatInviteLink¶
Returns: ChatInviteLink
- class litegram.methods.create_chat_invite_link.CreateChatInviteLink(*, chat_id: ChatIdUnion, name: str | None = None, expire_date: DateTimeUnion | None = None, member_limit: int | None = None, creates_join_request: bool | None = None, **extra_data: Any)[source]¶
Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method
litegram.methods.revoke_chat_invite_link.RevokeChatInviteLink. Returns the new invite link aslitegram.types.chat_invite_link.ChatInviteLinkobject.Source: https://core.telegram.org/bots/api#createchatinvitelink
- chat_id: ChatIdUnion¶
Unique identifier for the target chat or username of the target channel (in the format
@channelusername)
Usage¶
As bot method¶
result: ChatInviteLink = await bot.create_chat_invite_link(...)
Method as object¶
Imports:
from litegram.methods.create_chat_invite_link import CreateChatInviteLinkalias:
from litegram.methods import CreateChatInviteLink
With specific bot¶
result: ChatInviteLink = await bot(CreateChatInviteLink(...))
As reply into Webhook in handler¶
return CreateChatInviteLink(...)