createChatSubscriptionInviteLink¶
Returns: ChatInviteLink
- class litegram.methods.create_chat_subscription_invite_link.CreateChatSubscriptionInviteLink(*, chat_id: ChatIdUnion, subscription_period: DateTimeUnion, subscription_price: int, name: str | None = None, **extra_data: Any)[source]¶
Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method
litegram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLinkor revoked using the methodlitegram.methods.revoke_chat_invite_link.RevokeChatInviteLink. Returns the new invite link as alitegram.types.chat_invite_link.ChatInviteLinkobject.Source: https://core.telegram.org/bots/api#createchatsubscriptioninvitelink
- chat_id: ChatIdUnion¶
Unique identifier for the target channel chat or username of the target channel (in the format
@channelusername)
- subscription_period: DateTimeUnion¶
The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).
Usage¶
As bot method¶
result: ChatInviteLink = await bot.create_chat_subscription_invite_link(...)
Method as object¶
Imports:
from litegram.methods.create_chat_subscription_invite_link import CreateChatSubscriptionInviteLinkalias:
from litegram.methods import CreateChatSubscriptionInviteLink
With specific bot¶
result: ChatInviteLink = await bot(CreateChatSubscriptionInviteLink(...))
As reply into Webhook in handler¶
return CreateChatSubscriptionInviteLink(...)