mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-03 15:19:30 +00:00
Merge branch '25.0.0' into api-v9.0-premium
This commit is contained in:
@@ -330,6 +330,57 @@ public final class dev/inmo/tgbotapi/extensions/api/bot/SetMyShortDescriptionKt
|
||||
public static synthetic fun setMyShortDescription$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/micro_utils/language_codes/IetfLang;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessagesGeneratedVariationKt {
|
||||
public static final fun deleteBusinessMessages-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessagesKt {
|
||||
public static final fun deleteBusinessMessages-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/GetBusinessAccountStarBalanceKt {
|
||||
public static final fun getBusinessAccountStarBalance-spp27rg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/ReadBusinessMessageGeneratedVariationKt {
|
||||
public static final fun readBusinessMessage-1MWLODE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/Chat;JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/ReadBusinessMessageKt {
|
||||
public static final fun readBusinessMessage-kYJnN-U (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;JJLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun readBusinessMessage-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/RemoveBusinessAccountProfilePhotoKt {
|
||||
public static final fun removeBusinessAccountProfilePhoto-spp27rg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountBioKt {
|
||||
public static final fun setBusinessAccountBio-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountNameKt {
|
||||
public static final fun setBusinessAccountName-XzFA9qU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun setBusinessAccountName-XzFA9qU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountProfilePhotoKt {
|
||||
public static final fun setBusinessAccountProfilePhoto-XzFA9qU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun setBusinessAccountProfilePhoto-XzFA9qU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountUsernameGeneratedVariationKt {
|
||||
public static final fun setBusinessAccountUsername-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountUsernameKt {
|
||||
public static final fun setBusinessAccountUsername-_dB6Ko0 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/TransferBusinessAccountStarBalanceKt {
|
||||
public static final fun transferBusinessAccountStarBalance-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ILkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/chat/ExportChatInviteLinkKt {
|
||||
public static final fun exportChatInviteLink (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun exportChatInviteLink (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -1089,12 +1140,12 @@ public final class dev/inmo/tgbotapi/extensions/api/gifts/GetAvailableGiftsKt {
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftGeneratedVariationKt {
|
||||
public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift-0SDnvgk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift-GROm3fU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift-VjR9mJc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift-ySMgKnk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift-VjR9mJc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift-ySMgKnk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftKt {
|
||||
@@ -1109,10 +1160,10 @@ public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftKt {
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftToChatGeneratedVariationKt {
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat-0SDnvgk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat-GROm3fU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
@@ -0,0 +1,20 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerateVariations
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerationVariant
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.DeleteBusinessMessages
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.ChatId
|
||||
import dev.inmo.tgbotapi.types.MessageId
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||
|
||||
@GenerateVariations
|
||||
public suspend fun TelegramBot.deleteBusinessMessages(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
@GenerationVariant(List::class, "messages.map { it.messageId }", "messages", AccessibleMessage::class)
|
||||
messageIds: List<MessageId>
|
||||
): Boolean = execute(
|
||||
DeleteBusinessMessages(businessConnectionId, messageIds)
|
||||
)
|
@@ -0,0 +1,16 @@
|
||||
// THIS CODE HAVE BEEN GENERATED AUTOMATICALLY
|
||||
// TO REGENERATE IT JUST DELETE FILE
|
||||
// ORIGINAL FILE: DeleteBusinessMessages.kt
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||
import kotlin.Boolean
|
||||
import kotlin.collections.List
|
||||
|
||||
public suspend fun TelegramBot.deleteBusinessMessages(businessConnectionId: BusinessConnectionId,
|
||||
messages: List<AccessibleMessage>): Boolean = deleteBusinessMessages(
|
||||
businessConnectionId = businessConnectionId, messageIds = with(messages) {messages.map {
|
||||
it.messageId }}
|
||||
)
|
@@ -0,0 +1,12 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.GetBusinessAccountStarBalance
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.payments.stars.StarAmount
|
||||
|
||||
public suspend fun TelegramBot.getBusinessAccountStarBalance(
|
||||
businessConnectionId: BusinessConnectionId
|
||||
): StarAmount = execute(
|
||||
GetBusinessAccountStarBalance(businessConnectionId)
|
||||
)
|
@@ -0,0 +1,27 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerateVariations
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerationVariant
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.ReadBusinessMessage
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.ChatId
|
||||
import dev.inmo.tgbotapi.types.MessageId
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||
import dev.inmo.tgbotapi.types.toChatId
|
||||
|
||||
@GenerateVariations
|
||||
public suspend fun TelegramBot.readBusinessMessage(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
@GenerationVariant(Chat::class, "chat.id.toChatId()", "chat")
|
||||
chatId: ChatId,
|
||||
messageId: MessageId
|
||||
): Boolean = execute(
|
||||
ReadBusinessMessage(businessConnectionId, chatId, messageId)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.readBusinessMessage(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
message: AccessibleMessage
|
||||
): Boolean = readBusinessMessage(businessConnectionId, message.chat.id.toChatId(), message.messageId)
|
@@ -0,0 +1,20 @@
|
||||
// THIS CODE HAVE BEEN GENERATED AUTOMATICALLY
|
||||
// TO REGENERATE IT JUST DELETE FILE
|
||||
// ORIGINAL FILE: ReadBusinessMessage.kt
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.types.MessageId
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.toChatId
|
||||
import kotlin.Boolean
|
||||
|
||||
public suspend fun TelegramBot.readBusinessMessage(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
chat: Chat,
|
||||
messageId: MessageId,
|
||||
): Boolean = readBusinessMessage(
|
||||
businessConnectionId = businessConnectionId, chatId = with(chat) {chat.id.toChatId()}, messageId
|
||||
= messageId
|
||||
)
|
@@ -0,0 +1,11 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.RemoveBusinessAccountProfilePhoto
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
|
||||
public suspend fun TelegramBot.removeBusinessAccountProfilePhoto(
|
||||
businessConnectionId: BusinessConnectionId
|
||||
): Boolean = execute(
|
||||
RemoveBusinessAccountProfilePhoto(businessConnectionId)
|
||||
)
|
@@ -0,0 +1,12 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.SetBusinessAccountBio
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
|
||||
public suspend fun TelegramBot.setBusinessAccountBio(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
bio: String
|
||||
): Boolean = execute(
|
||||
SetBusinessAccountBio(businessConnectionId, bio)
|
||||
)
|
@@ -0,0 +1,13 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.SetBusinessAccountName
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
|
||||
public suspend fun TelegramBot.setBusinessAccountName(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
firstName: String,
|
||||
lastName: String? = null
|
||||
): Boolean = execute(
|
||||
SetBusinessAccountName(businessConnectionId, firstName, lastName)
|
||||
)
|
@@ -0,0 +1,14 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.InputProfilePhoto
|
||||
import dev.inmo.tgbotapi.requests.business_connection.SetBusinessAccountProfilePhoto
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
|
||||
public suspend fun TelegramBot.setBusinessAccountProfilePhoto(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
photo: InputProfilePhoto,
|
||||
isPublic: Boolean = false
|
||||
): Boolean = execute(
|
||||
SetBusinessAccountProfilePhoto(businessConnectionId, photo, isPublic)
|
||||
)
|
@@ -0,0 +1,17 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerateVariations
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerationVariant
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.SetBusinessAccountUsername
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.Username
|
||||
|
||||
@GenerateVariations
|
||||
public suspend fun TelegramBot.setBusinessAccountUsername(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
@GenerationVariant(String::class, "Username(username)", "username")
|
||||
username: Username
|
||||
): Boolean = execute(
|
||||
SetBusinessAccountUsername(businessConnectionId, username)
|
||||
)
|
@@ -0,0 +1,16 @@
|
||||
// THIS CODE HAVE BEEN GENERATED AUTOMATICALLY
|
||||
// TO REGENERATE IT JUST DELETE FILE
|
||||
// ORIGINAL FILE: SetBusinessAccountUsername.kt
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.types.Username
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import kotlin.Boolean
|
||||
import kotlin.String
|
||||
|
||||
public suspend
|
||||
fun TelegramBot.setBusinessAccountUsername(businessConnectionId: BusinessConnectionId,
|
||||
username: String): Boolean = setBusinessAccountUsername(
|
||||
businessConnectionId = businessConnectionId, username = with(username) { Username(username) }
|
||||
)
|
@@ -0,0 +1,13 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.TransferBusinessAccountStarBalance
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.payments.stars.StarAmount
|
||||
|
||||
public suspend fun TelegramBot.transferBusinessAccountStarBalance(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
amount: Int
|
||||
): Boolean = execute(
|
||||
TransferBusinessAccountStarBalance(businessConnectionId, amount)
|
||||
)
|
@@ -22,7 +22,7 @@ public suspend fun TelegramBot.sendGift(
|
||||
)
|
||||
userId: UserId,
|
||||
@GenerationVariant(
|
||||
Gift::class,
|
||||
Gift.Regular::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
@@ -49,7 +49,7 @@ public suspend fun TelegramBot.sendGiftToChat(
|
||||
)
|
||||
chatId: ChatIdentifier,
|
||||
@GenerationVariant(
|
||||
Gift::class,
|
||||
Gift.Regular::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
@@ -76,7 +76,7 @@ public suspend fun TelegramBot.sendGift(
|
||||
)
|
||||
userId: UserId,
|
||||
@GenerationVariant(
|
||||
Gift::class,
|
||||
Gift.Regular::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
@@ -101,7 +101,7 @@ public suspend fun TelegramBot.sendGiftToChat(
|
||||
)
|
||||
chatId: ChatIdentifier,
|
||||
@GenerationVariant(
|
||||
Gift::class,
|
||||
Gift.Regular::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
|
@@ -34,7 +34,7 @@ public suspend fun TelegramBot.sendGift(
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
userId: UserId,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGift(
|
||||
@@ -43,7 +43,7 @@ public suspend fun TelegramBot.sendGift(
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
userId: UserId,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
@@ -54,7 +54,7 @@ public suspend fun TelegramBot.sendGift(
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
user: User,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGift(
|
||||
@@ -63,7 +63,7 @@ public suspend fun TelegramBot.sendGift(
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
user: User,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
|
@@ -34,7 +34,7 @@ public suspend fun TelegramBot.sendGiftToChat(
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chatId: ChatIdentifier,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGiftToChat(
|
||||
@@ -43,7 +43,7 @@ public suspend fun TelegramBot.sendGiftToChat(
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chatId: ChatIdentifier,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
@@ -54,7 +54,7 @@ public suspend fun TelegramBot.sendGiftToChat(
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chat: PublicChat,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGiftToChat(
|
||||
@@ -63,7 +63,7 @@ public suspend fun TelegramBot.sendGiftToChat(
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chat: PublicChat,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
|
Reference in New Issue
Block a user