1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 00:03:48 +00:00

add support of business connection id in pin/unpin for messages

This commit is contained in:
InsanusMokrassar 2024-08-01 17:17:41 +06:00
parent 42b32af986
commit 88008b7cfc
7 changed files with 65 additions and 45 deletions

View File

@ -667,12 +667,12 @@ public final class dev/inmo/tgbotapi/extensions/api/chat/modify/DeleteChatPhotoK
} }
public final class dev/inmo/tgbotapi/extensions/api/chat/modify/PinChatMessageKt { public final class dev/inmo/tgbotapi/extensions/api/chat/modify/PinChatMessageKt {
public static final fun pinChatMessage (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun pinChatMessage-iJMbh4A (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun pinChatMessage$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun pinChatMessage-iJMbh4A$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun pinChatMessage-SAUdIcY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun pinChatMessage-rd3ngj0 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun pinChatMessage-SAUdIcY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun pinChatMessage-rd3ngj0 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun pinChatMessage-SAUdIcY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun pinChatMessage-rd3ngj0$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun pinChatMessage-SAUdIcY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun pinChatMessage-rd3ngj0$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
} }
public final class dev/inmo/tgbotapi/extensions/api/chat/modify/SetChatDescriptionKt { public final class dev/inmo/tgbotapi/extensions/api/chat/modify/SetChatDescriptionKt {
@ -712,11 +712,12 @@ public final class dev/inmo/tgbotapi/extensions/api/chat/modify/UnpinAllChatMess
} }
public final class dev/inmo/tgbotapi/extensions/api/chat/modify/UnpinChatMessageKt { public final class dev/inmo/tgbotapi/extensions/api/chat/modify/UnpinChatMessageKt {
public static final fun unpinChatMessage (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun unpinChatMessage-DZdi6a4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun unpinChatMessage-MzaUNdY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun unpinChatMessage-DZdi6a4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/MessageId;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun unpinChatMessage-MzaUNdY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/MessageId;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun unpinChatMessage-DZdi6a4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun unpinChatMessage-MzaUNdY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun unpinChatMessage-DZdi6a4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/MessageId;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun unpinChatMessage-MzaUNdY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/MessageId;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun unpinChatMessage-efQd2eE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun unpinChatMessage-efQd2eE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
} }
public final class dev/inmo/tgbotapi/extensions/api/chat/stickers/DeleteChatStickerSetKt { public final class dev/inmo/tgbotapi/extensions/api/chat/stickers/DeleteChatStickerSetKt {

View File

@ -4,22 +4,27 @@ import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.chat.modify.PinChatMessage import dev.inmo.tgbotapi.requests.chat.modify.PinChatMessage
import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.MessageId
import dev.inmo.tgbotapi.types.businessConnectionId
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
public suspend fun TelegramBot.pinChatMessage( public suspend fun TelegramBot.pinChatMessage(
chatId: ChatIdentifier, chatId: ChatIdentifier,
messageId: MessageId, messageId: MessageId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false disableNotification: Boolean = false
): Boolean = execute(PinChatMessage(chatId, messageId, disableNotification)) ): Boolean = execute(PinChatMessage(chatId, messageId, businessConnectionId, disableNotification))
public suspend fun TelegramBot.pinChatMessage( public suspend fun TelegramBot.pinChatMessage(
chat: Chat, chat: Chat,
messageId: MessageId, messageId: MessageId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
disableNotification: Boolean = false disableNotification: Boolean = false
): Boolean = pinChatMessage(chat.id, messageId, disableNotification) ): Boolean = pinChatMessage(chat.id, messageId, businessConnectionId, disableNotification)
public suspend fun TelegramBot.pinChatMessage( public suspend fun TelegramBot.pinChatMessage(
message: AccessibleMessage, message: AccessibleMessage,
businessConnectionId: BusinessConnectionId? = message.chat.id.businessConnectionId,
disableNotification: Boolean = false disableNotification: Boolean = false
): Boolean = pinChatMessage(message.chat.id, message.messageId, disableNotification) ): Boolean = pinChatMessage(message.chat.id, message.messageId, businessConnectionId, disableNotification)

View File

@ -4,19 +4,24 @@ import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.chat.modify.UnpinChatMessage import dev.inmo.tgbotapi.requests.chat.modify.UnpinChatMessage
import dev.inmo.tgbotapi.types.ChatIdentifier import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.MessageId import dev.inmo.tgbotapi.types.MessageId
import dev.inmo.tgbotapi.types.businessConnectionId
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
public suspend fun TelegramBot.unpinChatMessage( public suspend fun TelegramBot.unpinChatMessage(
chatId: ChatIdentifier, chatId: ChatIdentifier,
messageId: MessageId? = null messageId: MessageId? = null,
): Boolean = execute(UnpinChatMessage(chatId, messageId)) businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId
): Boolean = execute(UnpinChatMessage(chatId, messageId, businessConnectionId))
public suspend fun TelegramBot.unpinChatMessage( public suspend fun TelegramBot.unpinChatMessage(
chat: Chat, chat: Chat,
messageId: MessageId? = null messageId: MessageId? = null,
): Boolean = unpinChatMessage(chat.id, messageId) businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId
): Boolean = unpinChatMessage(chat.id, messageId, businessConnectionId)
public suspend fun TelegramBot.unpinChatMessage( public suspend fun TelegramBot.unpinChatMessage(
message: AccessibleMessage message: AccessibleMessage,
): Boolean = unpinChatMessage(message.chat.id, message.messageId) businessConnectionId: BusinessConnectionId? = message.chat.id.businessConnectionId,
): Boolean = unpinChatMessage(message.chat.id, message.messageId, businessConnectionId)

View File

@ -168,8 +168,7 @@ public abstract interface class dev/inmo/tgbotapi/abstracts/types/OptionalChatRe
public abstract fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier; public abstract fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
} }
public abstract interface class dev/inmo/tgbotapi/abstracts/types/OptionallyBusinessConnectionRequest { public abstract interface class dev/inmo/tgbotapi/abstracts/types/OptionallyBusinessConnectionRequest : dev/inmo/tgbotapi/abstracts/types/WithOptionalBusinessConnectionId {
public abstract fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String;
} }
public abstract interface class dev/inmo/tgbotapi/abstracts/types/OptionallyWithEffectId { public abstract interface class dev/inmo/tgbotapi/abstracts/types/OptionallyWithEffectId {
@ -3076,16 +3075,18 @@ public final class dev/inmo/tgbotapi/requests/chat/modify/DeleteChatPhoto$Compan
public final fun serializer ()Lkotlinx/serialization/KSerializer; public final fun serializer ()Lkotlinx/serialization/KSerializer;
} }
public final class dev/inmo/tgbotapi/requests/chat/modify/PinChatMessage : dev/inmo/tgbotapi/abstracts/types/ChatRequest, dev/inmo/tgbotapi/abstracts/types/DisableNotification, dev/inmo/tgbotapi/abstracts/types/MessageAction, dev/inmo/tgbotapi/requests/abstracts/SimpleRequest { public final class dev/inmo/tgbotapi/requests/chat/modify/PinChatMessage : dev/inmo/tgbotapi/abstracts/types/ChatRequest, dev/inmo/tgbotapi/abstracts/types/DisableNotification, dev/inmo/tgbotapi/abstracts/types/MessageAction, dev/inmo/tgbotapi/abstracts/types/OptionallyBusinessConnectionRequest, dev/inmo/tgbotapi/requests/abstracts/SimpleRequest {
public static final field Companion Ldev/inmo/tgbotapi/requests/chat/modify/PinChatMessage$Companion; public static final field Companion Ldev/inmo/tgbotapi/requests/chat/modify/PinChatMessage$Companion;
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;JZILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;JZLkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ldev/inmo/tgbotapi/types/ChatIdentifier; public final fun component1 ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
public final fun component2-APLFQys ()J public final fun component2-APLFQys ()J
public final fun component3 ()Z public final fun component3-nXr5wdE ()Ljava/lang/String;
public final fun copy-HkzWJnM (Ldev/inmo/tgbotapi/types/ChatIdentifier;JZ)Ldev/inmo/tgbotapi/requests/chat/modify/PinChatMessage; public final fun component4 ()Z
public static synthetic fun copy-HkzWJnM$default (Ldev/inmo/tgbotapi/requests/chat/modify/PinChatMessage;Ldev/inmo/tgbotapi/types/ChatIdentifier;JZILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/chat/modify/PinChatMessage; public final fun copy-HtX6zsU (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;Z)Ldev/inmo/tgbotapi/requests/chat/modify/PinChatMessage;
public static synthetic fun copy-HtX6zsU$default (Ldev/inmo/tgbotapi/requests/chat/modify/PinChatMessage;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/chat/modify/PinChatMessage;
public fun equals (Ljava/lang/Object;)Z public fun equals (Ljava/lang/Object;)Z
public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String;
public fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier; public fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
public fun getDisableNotification ()Z public fun getDisableNotification ()Z
public fun getMessageId-APLFQys ()J public fun getMessageId-APLFQys ()J
@ -3337,15 +3338,17 @@ public final class dev/inmo/tgbotapi/requests/chat/modify/UnpinAllChatMessages$C
public final fun serializer ()Lkotlinx/serialization/KSerializer; public final fun serializer ()Lkotlinx/serialization/KSerializer;
} }
public final class dev/inmo/tgbotapi/requests/chat/modify/UnpinChatMessage : dev/inmo/tgbotapi/abstracts/types/ChatRequest, dev/inmo/tgbotapi/requests/abstracts/SimpleRequest { public final class dev/inmo/tgbotapi/requests/chat/modify/UnpinChatMessage : dev/inmo/tgbotapi/abstracts/types/ChatRequest, dev/inmo/tgbotapi/abstracts/types/OptionallyBusinessConnectionRequest, dev/inmo/tgbotapi/requests/abstracts/SimpleRequest {
public static final field Companion Ldev/inmo/tgbotapi/requests/chat/modify/UnpinChatMessage$Companion; public static final field Companion Ldev/inmo/tgbotapi/requests/chat/modify/UnpinChatMessage$Companion;
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ldev/inmo/tgbotapi/types/ChatIdentifier; public final fun component1 ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
public final fun component2-CigXjpw ()Ldev/inmo/tgbotapi/types/MessageId; public final fun component2-CigXjpw ()Ldev/inmo/tgbotapi/types/MessageId;
public final fun copy-rTT8EQM (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;)Ldev/inmo/tgbotapi/requests/chat/modify/UnpinChatMessage; public final fun component3-nXr5wdE ()Ljava/lang/String;
public static synthetic fun copy-rTT8EQM$default (Ldev/inmo/tgbotapi/requests/chat/modify/UnpinChatMessage;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/chat/modify/UnpinChatMessage; public final fun copy-PPbMvFs (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;Ljava/lang/String;)Ldev/inmo/tgbotapi/requests/chat/modify/UnpinChatMessage;
public static synthetic fun copy-PPbMvFs$default (Ldev/inmo/tgbotapi/requests/chat/modify/UnpinChatMessage;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageId;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/chat/modify/UnpinChatMessage;
public fun equals (Ljava/lang/Object;)Z public fun equals (Ljava/lang/Object;)Z
public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String;
public fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier; public fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
public final fun getMessageId-CigXjpw ()Ldev/inmo/tgbotapi/types/MessageId; public final fun getMessageId-CigXjpw ()Ldev/inmo/tgbotapi/types/MessageId;
public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy;
@ -8553,6 +8556,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt {
public static final field hasAggressiveAntiSpamEnabledField Ljava/lang/String; public static final field hasAggressiveAntiSpamEnabledField Ljava/lang/String;
public static final field hasCustomCertificateField Ljava/lang/String; public static final field hasCustomCertificateField Ljava/lang/String;
public static final field hasHiddenMembersField Ljava/lang/String; public static final field hasHiddenMembersField Ljava/lang/String;
public static final field hasMainWebAppField Ljava/lang/String;
public static final field hasPrivateForwardsField Ljava/lang/String; public static final field hasPrivateForwardsField Ljava/lang/String;
public static final field hasPublicWinnersField Ljava/lang/String; public static final field hasPublicWinnersField Ljava/lang/String;
public static final field hasRestrictedVoiceAndVideoMessagesField Ljava/lang/String; public static final field hasRestrictedVoiceAndVideoMessagesField Ljava/lang/String;
@ -14515,14 +14519,15 @@ public final class dev/inmo/tgbotapi/types/chat/CommonUser$Companion {
public final class dev/inmo/tgbotapi/types/chat/ExtendedBot : dev/inmo/tgbotapi/types/chat/Bot, dev/inmo/tgbotapi/types/chat/ExtendedChat { public final class dev/inmo/tgbotapi/types/chat/ExtendedBot : dev/inmo/tgbotapi/types/chat/Bot, dev/inmo/tgbotapi/types/chat/ExtendedChat {
public static final field Companion Ldev/inmo/tgbotapi/types/chat/ExtendedBot$Companion; public static final field Companion Ldev/inmo/tgbotapi/types/chat/ExtendedBot$Companion;
public synthetic fun <init> (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;IILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;IZILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;IZLkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1-tHkBKVM ()J public final fun component1-tHkBKVM ()J
public final fun component10-f3WtEc0 ()I public final fun component10-f3WtEc0 ()I
public final fun component11-mg_h9nU ()Ldev/inmo/tgbotapi/types/colors/ColorId; public final fun component11-mg_h9nU ()Ldev/inmo/tgbotapi/types/colors/ColorId;
public final fun component12-GbmMWyQ ()Ljava/lang/String; public final fun component12-GbmMWyQ ()Ljava/lang/String;
public final fun component13-GbmMWyQ ()Ljava/lang/String; public final fun component13-GbmMWyQ ()Ljava/lang/String;
public final fun component14 ()I public final fun component14 ()I
public final fun component15 ()Z
public final fun component2 ()Ljava/lang/String; public final fun component2 ()Ljava/lang/String;
public final fun component3 ()Ljava/lang/String; public final fun component3 ()Ljava/lang/String;
public final fun component4-san03mo ()Ljava/lang/String; public final fun component4-san03mo ()Ljava/lang/String;
@ -14531,8 +14536,8 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedBot : dev/inmo/tgbotapi/
public final fun component7 ()Z public final fun component7 ()Z
public final fun component8 ()Z public final fun component8 ()Z
public final fun component9 ()Ldev/inmo/tgbotapi/types/ChatPhoto; public final fun component9 ()Ldev/inmo/tgbotapi/types/ChatPhoto;
public final fun copy-gWg6A_4 (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;I)Ldev/inmo/tgbotapi/types/chat/ExtendedBot; public final fun copy-IItryQQ (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;IZ)Ldev/inmo/tgbotapi/types/chat/ExtendedBot;
public static synthetic fun copy-gWg6A_4$default (Ldev/inmo/tgbotapi/types/chat/ExtendedBot;JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;IILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedBot; public static synthetic fun copy-IItryQQ$default (Ldev/inmo/tgbotapi/types/chat/ExtendedBot;JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;IZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedBot;
public fun equals (Ljava/lang/Object;)Z public fun equals (Ljava/lang/Object;)Z
public fun getAccentColorId-f3WtEc0 ()I public fun getAccentColorId-f3WtEc0 ()I
public fun getBackgroundCustomEmojiId-GbmMWyQ ()Ljava/lang/String; public fun getBackgroundCustomEmojiId-GbmMWyQ ()Ljava/lang/String;
@ -14541,6 +14546,7 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedBot : dev/inmo/tgbotapi/
public final fun getCanReadAllGroupMessages ()Z public final fun getCanReadAllGroupMessages ()Z
public fun getChatPhoto ()Ldev/inmo/tgbotapi/types/ChatPhoto; public fun getChatPhoto ()Ldev/inmo/tgbotapi/types/ChatPhoto;
public fun getFirstName ()Ljava/lang/String; public fun getFirstName ()Ljava/lang/String;
public final fun getHasMainWebApp ()Z
public synthetic fun getId ()Ldev/inmo/tgbotapi/types/IdChatIdentifier; public synthetic fun getId ()Ldev/inmo/tgbotapi/types/IdChatIdentifier;
public fun getId-tHkBKVM ()J public fun getId-tHkBKVM ()J
public fun getLastName ()Ljava/lang/String; public fun getLastName ()Ljava/lang/String;

View File

@ -1,7 +1,3 @@
package dev.inmo.tgbotapi.abstracts.types package dev.inmo.tgbotapi.abstracts.types
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId interface OptionallyBusinessConnectionRequest : WithOptionalBusinessConnectionId
interface OptionallyBusinessConnectionRequest {
val businessConnectionId: BusinessConnectionId?
}

View File

@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.requests.chat.modify
import dev.inmo.tgbotapi.abstracts.types.* import dev.inmo.tgbotapi.abstracts.types.*
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import kotlinx.serialization.* import kotlinx.serialization.*
import kotlinx.serialization.builtins.serializer import kotlinx.serialization.builtins.serializer
@ -17,9 +18,11 @@ data class PinChatMessage (
override val chatId: ChatIdentifier, override val chatId: ChatIdentifier,
@SerialName(messageIdField) @SerialName(messageIdField)
override val messageId: MessageId, override val messageId: MessageId,
@SerialName(businessConnectionIdField)
override val businessConnectionId: BusinessConnectionId? = null,
@SerialName(disableNotificationField) @SerialName(disableNotificationField)
override val disableNotification: Boolean = false override val disableNotification: Boolean = false
): ChatRequest, SimpleRequest<Boolean>, MessageAction, DisableNotification { ): ChatRequest, SimpleRequest<Boolean>, MessageAction, DisableNotification, OptionallyBusinessConnectionRequest {
override fun method(): String = "pinChatMessage" override fun method(): String = "pinChatMessage"
override val resultDeserializer: DeserializationStrategy<Boolean> override val resultDeserializer: DeserializationStrategy<Boolean>
get() = Boolean.serializer() get() = Boolean.serializer()

View File

@ -1,8 +1,10 @@
package dev.inmo.tgbotapi.requests.chat.modify package dev.inmo.tgbotapi.requests.chat.modify
import dev.inmo.tgbotapi.abstracts.types.ChatRequest import dev.inmo.tgbotapi.abstracts.types.ChatRequest
import dev.inmo.tgbotapi.abstracts.types.OptionallyBusinessConnectionRequest
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import kotlinx.serialization.* import kotlinx.serialization.*
import kotlinx.serialization.builtins.serializer import kotlinx.serialization.builtins.serializer
@ -11,8 +13,10 @@ data class UnpinChatMessage(
@SerialName(chatIdField) @SerialName(chatIdField)
override val chatId: ChatIdentifier, override val chatId: ChatIdentifier,
@SerialName(messageIdField) @SerialName(messageIdField)
val messageId: MessageId? = null val messageId: MessageId? = null,
): ChatRequest, SimpleRequest<Boolean> { @SerialName(businessConnectionIdField)
override val businessConnectionId: BusinessConnectionId? = null
): ChatRequest, SimpleRequest<Boolean>, OptionallyBusinessConnectionRequest {
override fun method(): String = "unpinChatMessage" override fun method(): String = "unpinChatMessage"
override val resultDeserializer: DeserializationStrategy<Boolean> override val resultDeserializer: DeserializationStrategy<Boolean>
get() = Boolean.serializer() get() = Boolean.serializer()