diff --git a/tgbotapi.api/api/tgbotapi.api.api b/tgbotapi.api/api/tgbotapi.api.api index e3c574a413..08e0fc6f62 100644 --- a/tgbotapi.api/api/tgbotapi.api.api +++ b/tgbotapi.api/api/tgbotapi.api.api @@ -486,10 +486,18 @@ public final class dev/inmo/tgbotapi/extensions/api/chat/invite_links/CreateChat public static final fun createChatInviteLinkWithLimitedMembers-R4jdXRs (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;IDLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun createChatInviteLinkWithLimitedMembers-R4jdXRs$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;IDLjava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun createChatInviteLinkWithLimitedMembers-R4jdXRs$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;IDLjava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun createChatSubscriptionInviteLink-45ZY6uE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;IJLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun createChatSubscriptionInviteLink-45ZY6uE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;IJLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun createChatSubscriptionInviteLink-45ZY6uE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;IJLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun createChatSubscriptionInviteLink-45ZY6uE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;IJLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun createChatSubscriptionInviteLink-9yjpIiU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;IJLjava/lang/String;DLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun createChatSubscriptionInviteLink-9yjpIiU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;IJLjava/lang/String;DLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun createChatSubscriptionInviteLink-9yjpIiU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;IJLjava/lang/String;DLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun createChatSubscriptionInviteLink-9yjpIiU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;IJLjava/lang/String;DLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun createChatSubscriptionInviteLink-iadTtqY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;IJLjava/lang/String;DLkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun createChatSubscriptionInviteLink-iadTtqY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;IJLjava/lang/String;DLkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun createChatSubscriptionInviteLink-iadTtqY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;IJLjava/lang/String;DLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun createChatSubscriptionInviteLink-iadTtqY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;IJLjava/lang/String;DLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun createChatSubscriptionInviteLink-u39P7bI (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;IJLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun createChatSubscriptionInviteLink-u39P7bI (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;IJLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun createChatSubscriptionInviteLink-u39P7bI$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;IJLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/invite_links/CreateChatInviteLink.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/invite_links/CreateChatInviteLink.kt index b24ae9b25d..a765adaed4 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/invite_links/CreateChatInviteLink.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/invite_links/CreateChatInviteLink.kt @@ -117,4 +117,37 @@ public suspend fun TelegramBot.createChatSubscriptionInviteLink( subscriptionPeriod: TimeSpan = 30.days, name: String? = null, expirationUnixTimeStamp: DateTime, -): ChatInviteLinkUnlimited = createChatSubscriptionInviteLink(chat.id, subscriptionPrice, subscriptionPeriod, name, expirationUnixTimeStamp) \ No newline at end of file +): ChatInviteLinkUnlimited = createChatSubscriptionInviteLink(chat.id, subscriptionPrice, subscriptionPeriod, name, expirationUnixTimeStamp) + + +public suspend fun TelegramBot.createChatSubscriptionInviteLink( + chatId: ChatIdentifier, + subscriptionPrice: Int, + subscriptionPeriod: TimeSpan = 30.days, + name: String? = null, + expirationUnixTimeStamp: TelegramDate? = null, +): ChatInviteLinkUnlimited = createChatSubscriptionInviteLink(chatId, subscriptionPrice.toUInt(), subscriptionPeriod, name, expirationUnixTimeStamp) + +public suspend fun TelegramBot.createChatSubscriptionInviteLink( + chat: PublicChat, + subscriptionPrice: Int, + subscriptionPeriod: TimeSpan = 30.days, + name: String? = null, + expirationUnixTimeStamp: TelegramDate? = null, +): ChatInviteLinkUnlimited = createChatSubscriptionInviteLink(chat, subscriptionPrice.toUInt(), subscriptionPeriod, name, expirationUnixTimeStamp) + +public suspend fun TelegramBot.createChatSubscriptionInviteLink( + chatId: ChatIdentifier, + subscriptionPrice: Int, + subscriptionPeriod: TimeSpan = 30.days, + name: String? = null, + expirationUnixTimeStamp: DateTime, +): ChatInviteLinkUnlimited = createChatSubscriptionInviteLink(chatId, subscriptionPrice.toUInt(), subscriptionPeriod, name, expirationUnixTimeStamp) + +public suspend fun TelegramBot.createChatSubscriptionInviteLink( + chat: PublicChat, + subscriptionPrice: Int, + subscriptionPeriod: TimeSpan = 30.days, + name: String? = null, + expirationUnixTimeStamp: DateTime, +): ChatInviteLinkUnlimited = createChatSubscriptionInviteLink(chat, subscriptionPrice.toUInt(), subscriptionPeriod, name, expirationUnixTimeStamp)