1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-03 15:19:30 +00:00

add support of TransactionPartnerChat

This commit is contained in:
2025-02-14 18:42:48 +06:00
parent 31a66eb8e6
commit 7d3e9325f1
4 changed files with 101 additions and 25 deletions

View File

@@ -1203,6 +1203,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun chatMessageReactionUpdatedUpdateOrThrow (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate;
public static final fun chatMessageReactionsCountUpdatedUpdateOrNull (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate;
public static final fun chatMessageReactionsCountUpdatedUpdateOrThrow (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate;
public static final fun chatOrNull (Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner;)Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Chat;
public static final fun chatOrThrow (Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner;)Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Chat;
public static final fun chatSharedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/request/ChatShared;
public static final fun chatSharedOrNull (Ldev/inmo/tgbotapi/types/request/RequestResponse;)Ldev/inmo/tgbotapi/types/request/ChatShared;
public static final fun chatSharedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/request/ChatShared;
@@ -1530,6 +1532,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifChannelEvent (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifChannelEventMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifChannelPostUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifChat (Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifChatBackground (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifChatBoostAdded (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifChatBoostRemovedUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;

View File

@@ -5340,6 +5340,15 @@ public inline fun <T>
TransactionPartner.ifAffiliateProgram(block: (TransactionPartner.AffiliateProgram) -> T): T? =
affiliateProgramOrNull() ?.let(block)
public inline fun TransactionPartner.chatOrNull(): TransactionPartner.Chat? = this as?
dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Chat
public inline fun TransactionPartner.chatOrThrow(): TransactionPartner.Chat = this as
dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Chat
public inline fun <T> TransactionPartner.ifChat(block: (TransactionPartner.Chat) -> T): T? =
chatOrNull() ?.let(block)
public inline fun TransactionPartner.fragmentOrNull(): TransactionPartner.Fragment? = this as?
dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Fragment