mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-03-03 09:22:22 +00:00
fixes?
This commit is contained in:
@@ -347,10 +347,10 @@ public final class dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessa
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/GetBusinessAccountGiftsKt {
|
||||
public static final fun getBusinessAccountGifts-LATcL_E (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZZZZZZLjava/lang/String;Ljava/lang/Integer;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun getBusinessAccountGifts-LATcL_E$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZZZZZZLjava/lang/String;Ljava/lang/Integer;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun getBusinessAccountGiftsFlow-LATcL_E (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZZZZZZLjava/lang/String;Ljava/lang/Integer;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static synthetic fun getBusinessAccountGiftsFlow-LATcL_E$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZZZZZZLjava/lang/String;Ljava/lang/Integer;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static final fun getBusinessAccountGifts-ncRJlhg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZZZZZZZZLjava/lang/String;Ljava/lang/Integer;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun getBusinessAccountGifts-ncRJlhg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZZZZZZZZLjava/lang/String;Ljava/lang/Integer;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun getBusinessAccountGiftsFlow-ncRJlhg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZZZZZZZZLjava/lang/String;Ljava/lang/Integer;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static synthetic fun getBusinessAccountGiftsFlow-ncRJlhg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZZZZZZZZLjava/lang/String;Ljava/lang/Integer;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/GetBusinessAccountStarBalanceKt {
|
||||
|
||||
@@ -14,8 +14,10 @@ public suspend fun TelegramBot.getBusinessAccountGifts(
|
||||
excludeUnsaved: Boolean = false,
|
||||
excludeSaved: Boolean = false,
|
||||
excludeUnlimited: Boolean = false,
|
||||
excludeLimited: Boolean = false,
|
||||
excludeLimitedUpgradable: Boolean = false,
|
||||
excludeLimitedNonUpgradable: Boolean = false,
|
||||
excludeUnique: Boolean = false,
|
||||
excludeFromBlockchain: Boolean = false,
|
||||
sortByPrice: Boolean = false,
|
||||
offset: String? = null,
|
||||
limit: Int? = null
|
||||
@@ -25,8 +27,10 @@ public suspend fun TelegramBot.getBusinessAccountGifts(
|
||||
excludeUnsaved,
|
||||
excludeSaved,
|
||||
excludeUnlimited,
|
||||
excludeLimited,
|
||||
excludeLimitedUpgradable,
|
||||
excludeLimitedNonUpgradable,
|
||||
excludeUnique,
|
||||
excludeFromBlockchain,
|
||||
sortByPrice,
|
||||
offset,
|
||||
limit
|
||||
@@ -43,8 +47,10 @@ public suspend fun TelegramBot.getBusinessAccountGifts(
|
||||
* @param excludeUnsaved Whether to exclude unsaved gifts
|
||||
* @param excludeSaved Whether to exclude saved gifts
|
||||
* @param excludeUnlimited Whether to exclude unlimited gifts
|
||||
* @param excludeLimited Whether to exclude limited gifts
|
||||
* @param excludeLimitedUpgradable Whether to exclude limited upgradable gifts
|
||||
* @param excludeLimitedNonUpgradable Whether to exclude limited non-upgradable gifts
|
||||
* @param excludeUnique Whether to exclude unique gifts
|
||||
* @param excludeFromBlockchain Whether to exclude gifts from blockchain
|
||||
* @param sortByPrice Whether to sort gifts by price
|
||||
* @param initialOffset The initial offset to start fetching from. If null, starts from the beginning
|
||||
* @param limit The maximum number of gifts to fetch per request
|
||||
@@ -57,8 +63,10 @@ public fun TelegramBot.getBusinessAccountGiftsFlow(
|
||||
excludeUnsaved: Boolean = false,
|
||||
excludeSaved: Boolean = false,
|
||||
excludeUnlimited: Boolean = false,
|
||||
excludeLimited: Boolean = false,
|
||||
excludeLimitedUpgradable: Boolean = false,
|
||||
excludeLimitedNonUpgradable: Boolean = false,
|
||||
excludeUnique: Boolean = false,
|
||||
excludeFromBlockchain: Boolean = false,
|
||||
sortByPrice: Boolean = false,
|
||||
initialOffset: String? = null,
|
||||
limit: Int? = null,
|
||||
@@ -72,8 +80,10 @@ public fun TelegramBot.getBusinessAccountGiftsFlow(
|
||||
excludeUnsaved,
|
||||
excludeSaved,
|
||||
excludeUnlimited,
|
||||
excludeLimited,
|
||||
excludeLimitedUpgradable,
|
||||
excludeLimitedNonUpgradable,
|
||||
excludeUnique,
|
||||
excludeFromBlockchain,
|
||||
sortByPrice,
|
||||
currentOffset,
|
||||
limit
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,6 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.excludeUnsavedField
|
||||
import dev.inmo.tgbotapi.types.excludeSavedField
|
||||
import dev.inmo.tgbotapi.types.excludeUnlimitedField
|
||||
import dev.inmo.tgbotapi.types.excludeLimitedField
|
||||
import dev.inmo.tgbotapi.types.excludeLimitedUpgradableField
|
||||
import dev.inmo.tgbotapi.types.excludeLimitedNonUpgradableField
|
||||
import dev.inmo.tgbotapi.types.excludeUniqueField
|
||||
@@ -32,9 +31,6 @@ data class GetBusinessAccountGifts(
|
||||
val excludeSaved: Boolean = false,
|
||||
@SerialName(excludeUnlimitedField)
|
||||
val excludeUnlimited: Boolean = false,
|
||||
@Deprecated("Use excludeLimitedUpgradable and excludeLimitedNonUpgradable instead")
|
||||
@SerialName(excludeLimitedField)
|
||||
val excludeLimited: Boolean = false,
|
||||
@SerialName(excludeLimitedUpgradableField)
|
||||
val excludeLimitedUpgradable: Boolean = false,
|
||||
@SerialName(excludeLimitedNonUpgradableField)
|
||||
|
||||
@@ -656,6 +656,7 @@ const val mediaField = "media"
|
||||
const val mainFrameTimestampField = "main_frame_timestamp"
|
||||
|
||||
const val paidMessageStarCountField = "paid_message_star_count"
|
||||
const val countField = "count"
|
||||
const val ratingField = "rating"
|
||||
const val uniqueGiftColorsField = "unique_gift_colors"
|
||||
const val paidStarCountField = "paid_star_count"
|
||||
@@ -755,6 +756,12 @@ const val textColorField = "text_color"
|
||||
const val nameColorField = "name_color"
|
||||
const val baseColorField = "base_color"
|
||||
const val linkColorField = "link_color"
|
||||
const val modelCustomEmojiIdField = "model_custom_emoji_id"
|
||||
const val symbolCustomEmojiIdField = "symbol_custom_emoji_id"
|
||||
const val lightThemeMainColorField = "light_theme_main_color"
|
||||
const val lightThemeOtherColorsField = "light_theme_other_colors"
|
||||
const val darkThemeMainColorField = "dark_theme_main_color"
|
||||
const val darkThemeOtherColorsField = "dark_theme_other_colors"
|
||||
|
||||
const val baseNameField = "base_name"
|
||||
const val numberField = "number"
|
||||
|
||||
@@ -16,10 +16,11 @@ import kotlinx.serialization.encoding.Encoder
|
||||
|
||||
@Serializable(Gift.Companion::class)
|
||||
sealed interface Gift {
|
||||
val id: GiftId?
|
||||
val publisherChat: PreviewChat?
|
||||
@Serializable(Regular.Companion::class)
|
||||
sealed interface Regular : Gift {
|
||||
val id: GiftId
|
||||
override val id: GiftId
|
||||
val sticker: Sticker
|
||||
val starCount: Int
|
||||
val totalCount: Int?
|
||||
@@ -175,7 +176,7 @@ sealed interface Gift {
|
||||
@Serializable
|
||||
data class Unique(
|
||||
@SerialName(giftIdField)
|
||||
val id: GiftId? = null,
|
||||
override val id: GiftId? = null,
|
||||
@SerialName(baseNameField)
|
||||
val baseName: String,
|
||||
@SerialName(nameField)
|
||||
@@ -195,7 +196,7 @@ sealed interface Gift {
|
||||
@SerialName(isPremiumField2)
|
||||
val isPremium: Boolean = false,
|
||||
@SerialName(colorsField)
|
||||
val colors: UniqueGiftColors = null
|
||||
val colors: UniqueGiftColors? = null
|
||||
) : Gift
|
||||
|
||||
companion object : KSerializer<Gift> {
|
||||
@@ -257,7 +258,7 @@ sealed interface Gift {
|
||||
value: Gift
|
||||
) {
|
||||
val surrogate = GiftSurrogate(
|
||||
id = (value as? Regular)?.id,
|
||||
id = value.id,
|
||||
sticker = (value as? Regular)?.sticker,
|
||||
star_count = (value as? Regular)?.starCount,
|
||||
total_count = (value as? Regular.Limited)?.totalCount,
|
||||
@@ -275,7 +276,6 @@ sealed interface Gift {
|
||||
model = (value as? Unique)?.model,
|
||||
symbol = (value as? Unique)?.symbol,
|
||||
backdrop = (value as? Unique)?.backdrop,
|
||||
gift_id = (value as? Unique)?.id,
|
||||
is_from_blockchain = (value as? Unique)?.isFromBlockchain ?: false,
|
||||
colors = (value as? Unique)?.colors,
|
||||
publisher_chat = value.publisherChat,
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
package dev.inmo.tgbotapi.types.gifts
|
||||
|
||||
import dev.inmo.tgbotapi.types.backgroundField
|
||||
import dev.inmo.tgbotapi.types.files.PathedFile
|
||||
import dev.inmo.tgbotapi.types.centerColorField
|
||||
import dev.inmo.tgbotapi.types.edgeColorField
|
||||
import dev.inmo.tgbotapi.types.textColorField
|
||||
import dev.inmo.tgbotapi.utils.RGBColor
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
|
||||
@Serializable
|
||||
data class GiftBackground(
|
||||
@SerialName(backgroundField)
|
||||
val background: PathedFile
|
||||
@SerialName(centerColorField)
|
||||
val centerColor: RGBColor,
|
||||
@SerialName(edgeColorField)
|
||||
val edgeColor: RGBColor,
|
||||
@SerialName(textColorField)
|
||||
val textColor: RGBColor
|
||||
)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package dev.inmo.tgbotapi.types.gifts.unique
|
||||
|
||||
import dev.inmo.tgbotapi.types.baseColorField
|
||||
import dev.inmo.tgbotapi.types.linkColorField
|
||||
import dev.inmo.tgbotapi.types.nameColorField
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.utils.RGBColor
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
@@ -10,10 +8,16 @@ import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class UniqueGiftColors(
|
||||
@SerialName(nameColorField)
|
||||
val nameColor: RGBColor,
|
||||
@SerialName(baseColorField)
|
||||
val baseColor: RGBColor,
|
||||
@SerialName(linkColorField)
|
||||
val linkColor: RGBColor
|
||||
@SerialName(modelCustomEmojiIdField)
|
||||
val modelCustomEmojiId: CustomEmojiId,
|
||||
@SerialName(symbolCustomEmojiIdField)
|
||||
val symbolCustomEmojiId: CustomEmojiId,
|
||||
@SerialName(lightThemeMainColorField)
|
||||
val lightThemeMainColor: RGBColor,
|
||||
@SerialName(lightThemeOtherColorsField)
|
||||
val lightThemeOtherColors: List<RGBColor>,
|
||||
@SerialName(darkThemeMainColorField)
|
||||
val darkThemeMainColor: RGBColor,
|
||||
@SerialName(darkThemeOtherColorsField)
|
||||
val darkThemeOtherColors: List<RGBColor>
|
||||
)
|
||||
|
||||
@@ -1991,6 +1991,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun ifPrivateEvent (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPrivateEventMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPrivateForumChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPrivateForumContentMessage (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPrivateForumContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPrivateUserChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifProximityAlertTriggered (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPublicChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
@@ -2513,6 +2515,10 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun privateEventOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/PrivateEvent;
|
||||
public static final fun privateForumChatOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PrivateForumChat;
|
||||
public static final fun privateForumChatOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PrivateForumChat;
|
||||
public static final fun privateForumContentMessageOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/abstracts/PrivateForumContentMessage;
|
||||
public static final fun privateForumContentMessageOrNull (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/PrivateForumContentMessage;
|
||||
public static final fun privateForumContentMessageOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/abstracts/PrivateForumContentMessage;
|
||||
public static final fun privateForumContentMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/PrivateForumContentMessage;
|
||||
public static final fun privateUserChatOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PrivateUserChat;
|
||||
public static final fun privateUserChatOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PrivateUserChat;
|
||||
public static final fun proximityAlertTriggeredOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ProximityAlertTriggered;
|
||||
|
||||
@@ -344,6 +344,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.PossiblyTopicMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyWithEffectMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.PotentiallyFromUserGroupContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.PrivateForumContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.PublicContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.SignedMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.SuggestedChannelDirectMessagesContentMessage
|
||||
@@ -801,6 +802,12 @@ public inline fun OptionallyWithUser.commonSuggestedChannelDirectMessagesContent
|
||||
|
||||
public inline fun <T> OptionallyWithUser.ifCommonSuggestedChannelDirectMessagesContentMessage(block: (CommonSuggestedChannelDirectMessagesContentMessage<MessageContent>) -> T): T? = commonSuggestedChannelDirectMessagesContentMessageOrNull() ?.let(block)
|
||||
|
||||
public inline fun OptionallyWithUser.privateForumContentMessageOrNull(): PrivateForumContentMessage<MessageContent>? = this as? dev.inmo.tgbotapi.types.message.abstracts.PrivateForumContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
|
||||
|
||||
public inline fun OptionallyWithUser.privateForumContentMessageOrThrow(): PrivateForumContentMessage<MessageContent> = this as dev.inmo.tgbotapi.types.message.abstracts.PrivateForumContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
|
||||
|
||||
public inline fun <T> OptionallyWithUser.ifPrivateForumContentMessage(block: (PrivateForumContentMessage<MessageContent>) -> T): T? = privateForumContentMessageOrNull() ?.let(block)
|
||||
|
||||
public inline fun OptionallyWithUser.supergroupEventMessageOrNull(): SupergroupEventMessage<SupergroupEvent>? = this as? dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage<dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent>
|
||||
|
||||
public inline fun OptionallyWithUser.supergroupEventMessageOrThrow(): SupergroupEventMessage<SupergroupEvent> = this as dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage<dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent>
|
||||
@@ -2139,6 +2146,12 @@ public inline fun Message.chatEventMessageOrThrow(): ChatEventMessage<ChatEvent>
|
||||
|
||||
public inline fun <T> Message.ifChatEventMessage(block: (ChatEventMessage<ChatEvent>) -> T): T? = chatEventMessageOrNull() ?.let(block)
|
||||
|
||||
public inline fun Message.privateForumContentMessageOrNull(): PrivateForumContentMessage<MessageContent>? = this as? dev.inmo.tgbotapi.types.message.abstracts.PrivateForumContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
|
||||
|
||||
public inline fun Message.privateForumContentMessageOrThrow(): PrivateForumContentMessage<MessageContent> = this as dev.inmo.tgbotapi.types.message.abstracts.PrivateForumContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
|
||||
|
||||
public inline fun <T> Message.ifPrivateForumContentMessage(block: (PrivateForumContentMessage<MessageContent>) -> T): T? = privateForumContentMessageOrNull() ?.let(block)
|
||||
|
||||
public inline fun Message.supergroupEventMessageOrNull(): SupergroupEventMessage<SupergroupEvent>? = this as? dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage<dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent>
|
||||
|
||||
public inline fun Message.supergroupEventMessageOrThrow(): SupergroupEventMessage<SupergroupEvent> = this as dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage<dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent>
|
||||
|
||||
Reference in New Issue
Block a user