From 170747741ffd3a50b36599edd0d590b7f27c4a5d Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 17 Apr 2024 13:55:37 +0600 Subject: [PATCH] remove redundant includes of business connection id in send requests --- .../dev/inmo/tgbotapi/requests/send/CopyMessage.kt | 10 ---------- .../dev/inmo/tgbotapi/requests/send/CopyMessages.kt | 4 ---- .../dev/inmo/tgbotapi/requests/send/SendContact.kt | 3 ++- .../dev/inmo/tgbotapi/requests/send/SendLocation.kt | 2 +- .../dev/inmo/tgbotapi/requests/send/SendMessage.kt | 2 +- .../dev/inmo/tgbotapi/requests/send/SendVenue.kt | 2 +- .../send/abstracts/SendContentMessageRequest.kt | 5 +++++ .../requests/send/abstracts/SendMessageRequest.kt | 3 +-- .../dev/inmo/tgbotapi/requests/send/games/SendGame.kt | 3 ++- .../inmo/tgbotapi/requests/send/media/SendAnimation.kt | 2 +- .../dev/inmo/tgbotapi/requests/send/media/SendAudio.kt | 2 +- .../inmo/tgbotapi/requests/send/media/SendDocument.kt | 2 +- .../tgbotapi/requests/send/media/SendMediaGroup.kt | 3 ++- .../dev/inmo/tgbotapi/requests/send/media/SendPhoto.kt | 2 +- .../inmo/tgbotapi/requests/send/media/SendSticker.kt | 3 ++- .../dev/inmo/tgbotapi/requests/send/media/SendVideo.kt | 2 +- .../inmo/tgbotapi/requests/send/media/SendVideoNote.kt | 2 +- .../dev/inmo/tgbotapi/requests/send/media/SendVoice.kt | 2 +- .../tgbotapi/requests/send/payments/SendInvoice.kt | 2 -- .../dev/inmo/tgbotapi/requests/send/polls/SendPoll.kt | 3 ++- 20 files changed, 26 insertions(+), 33 deletions(-) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/abstracts/SendContentMessageRequest.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/CopyMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/CopyMessage.kt index 6fbd01e393..5a13f941e9 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/CopyMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/CopyMessage.kt @@ -29,7 +29,6 @@ fun CopyMessage( text: String? = null, parseMode: ParseMode? = null, threadId: MessageThreadId? = toChatId.threadId, - businessConnectionId: BusinessConnectionId? = toChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -42,7 +41,6 @@ fun CopyMessage( parseMode, null, threadId, - businessConnectionId, disableNotification, protectContent, replyParameters, @@ -55,7 +53,6 @@ fun CopyMessage( messageId: MessageId, entities: List, threadId: MessageThreadId? = toChatId.threadId, - businessConnectionId: BusinessConnectionId? = toChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -68,7 +65,6 @@ fun CopyMessage( null, entities.toRawMessageEntities(), threadId, - businessConnectionId, disableNotification, protectContent, replyParameters, @@ -82,7 +78,6 @@ fun CopyMessage( text: String? = null, parseMode: ParseMode? = null, threadId: MessageThreadId? = toChatId.threadId, - businessConnectionId: BusinessConnectionId? = toChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -95,7 +90,6 @@ fun CopyMessage( parseMode, null, threadId, - businessConnectionId, disableNotification, protectContent, replyParameters, @@ -108,7 +102,6 @@ fun CopyMessage( toChatId: ChatIdentifier, entities: List, threadId: MessageThreadId? = toChatId.threadId, - businessConnectionId: BusinessConnectionId? = toChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, replyParameters: ReplyParameters? = null, @@ -121,7 +114,6 @@ fun CopyMessage( null, entities.toRawMessageEntities(), threadId, - businessConnectionId, disableNotification, protectContent, replyParameters, @@ -144,8 +136,6 @@ data class CopyMessage internal constructor( private val rawEntities: List? = null, @SerialName(messageThreadIdField) override val threadId: MessageThreadId? = toChatId.threadId, - @SerialName(businessConnectionIdField) - override val businessConnectionId: BusinessConnectionId? = toChatId.businessConnectionId, @SerialName(disableNotificationField) override val disableNotification: Boolean = false, @SerialName(protectContentField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/CopyMessages.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/CopyMessages.kt index 5125929d8a..abbde83186 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/CopyMessages.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/CopyMessages.kt @@ -22,7 +22,6 @@ fun CopyMessages( fromChatId: ChatIdentifier, messageIds: Array, threadId: MessageThreadId? = toChatId.threadId, - businessConnectionId: BusinessConnectionId? = toChatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, removeCaption: Boolean = false @@ -46,8 +45,6 @@ data class CopyMessages ( override val messageIds: List, @SerialName(messageThreadIdField) override val threadId: MessageThreadId? = toChatId.threadId, - @SerialName(businessConnectionIdField) - override val businessConnectionId: BusinessConnectionId? = toChatId.businessConnectionId, @SerialName(disableNotificationField) override val disableNotification: Boolean = false, @SerialName(protectContentField) @@ -58,7 +55,6 @@ data class CopyMessages ( MessagesAction, ProtectContent, OptionallyMessageThreadRequest, - OptionallyBusinessConnectionRequest, DisableNotification { override val chatId: ChatIdentifier get() = fromChatId diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendContact.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendContact.kt index 73266ccb97..cddf2625c2 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendContact.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendContact.kt @@ -1,6 +1,7 @@ package dev.inmo.tgbotapi.requests.send import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest +import dev.inmo.tgbotapi.requests.send.abstracts.SendContentMessageRequest import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId @@ -35,7 +36,7 @@ data class SendContact( override val replyParameters: ReplyParameters? = null, @SerialName(replyMarkupField) override val replyMarkup: KeyboardMarkup? = null -) : SendMessageRequest>, +) : SendContentMessageRequest>, ReplyingMarkupSendMessageRequest> { constructor( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendLocation.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendLocation.kt index e7bbab6238..a3e0d8b5b8 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendLocation.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendLocation.kt @@ -111,7 +111,7 @@ data class SendLocation internal constructor( override val replyParameters: ReplyParameters? = null, @SerialName(replyMarkupField) override val replyMarkup: KeyboardMarkup? = null -) : SendMessageRequest>, +) : SendContentMessageRequest>, ReplyingMarkupSendMessageRequest>, PositionedSendMessageRequest>, HorizontallyAccured, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendMessage.kt index 4823d4534c..0324c853b7 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendMessage.kt @@ -94,7 +94,7 @@ data class SendTextMessage internal constructor( override val replyParameters: ReplyParameters? = null, @SerialName(replyMarkupField) override val replyMarkup: KeyboardMarkup? = null -) : SendMessageRequest>, +) : SendContentMessageRequest>, ReplyingMarkupSendMessageRequest>, TextableSendMessageRequest>, LinkPreviewOptionsContainer diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendVenue.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendVenue.kt index 4acb1422bb..5f10337d3c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendVenue.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendVenue.kt @@ -45,7 +45,7 @@ data class SendVenue( override val replyParameters: ReplyParameters? = null, @SerialName(replyMarkupField) override val replyMarkup: KeyboardMarkup? = null -) : SendMessageRequest>, +) : SendContentMessageRequest>, PositionedSendMessageRequest>, TitledSendMessageRequest>, ReplyingMarkupSendMessageRequest> diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/abstracts/SendContentMessageRequest.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/abstracts/SendContentMessageRequest.kt new file mode 100644 index 0000000000..3b357906be --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/abstracts/SendContentMessageRequest.kt @@ -0,0 +1,5 @@ +package dev.inmo.tgbotapi.requests.send.abstracts + +import dev.inmo.tgbotapi.abstracts.types.OptionallyBusinessConnectionRequest + +interface SendContentMessageRequest : SendMessageRequest, OptionallyBusinessConnectionRequest diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/abstracts/SendMessageRequest.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/abstracts/SendMessageRequest.kt index 8f08a9a76f..e52810b8d4 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/abstracts/SendMessageRequest.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/abstracts/SendMessageRequest.kt @@ -6,5 +6,4 @@ interface SendMessageRequest : SendChatMessageRequest, WithReplyParameters, DisableNotification, ProtectContent, - OptionallyMessageThreadRequest, - OptionallyBusinessConnectionRequest + OptionallyMessageThreadRequest diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/games/SendGame.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/games/SendGame.kt index 4b604e0d78..f76a59d05d 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/games/SendGame.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/games/SendGame.kt @@ -1,6 +1,7 @@ package dev.inmo.tgbotapi.requests.send.games import dev.inmo.tgbotapi.abstracts.types.WithReplyMarkup +import dev.inmo.tgbotapi.requests.send.abstracts.SendContentMessageRequest import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId @@ -31,7 +32,7 @@ data class SendGame ( override val replyParameters: ReplyParameters? = null, @SerialName(replyMarkupField) override val replyMarkup: KeyboardMarkup? = null -) : SendMessageRequest>, +) : SendContentMessageRequest>, WithReplyMarkup { override fun method(): String = "sendGame" override val resultDeserializer: DeserializationStrategy> diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAnimation.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAnimation.kt index ed98790139..2cd5129abc 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAnimation.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAnimation.kt @@ -156,7 +156,7 @@ data class SendAnimationData internal constructor( @SerialName(replyMarkupField) override val replyMarkup: KeyboardMarkup? = null ) : DataRequest>, - SendMessageRequest>, + SendContentMessageRequest>, ReplyingMarkupSendMessageRequest>, TextableSendMessageRequest>, ThumbedSendMessageRequest>, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAudio.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAudio.kt index d0bf39e8a0..d63e00d307 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAudio.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendAudio.kt @@ -151,7 +151,7 @@ data class SendAudioData internal constructor( @SerialName(replyMarkupField) override val replyMarkup: KeyboardMarkup? = null ) : DataRequest>, - SendMessageRequest>, + SendContentMessageRequest>, ReplyingMarkupSendMessageRequest>, TextableSendMessageRequest>, ThumbedSendMessageRequest>, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendDocument.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendDocument.kt index 00d5d08af7..7b761ae617 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendDocument.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendDocument.kt @@ -165,7 +165,7 @@ data class SendDocumentData internal constructor( @SerialName(disableContentTypeDetectionField) val disableContentTypeDetection: Boolean? = null ) : DataRequest>, - SendMessageRequest>, + SendContentMessageRequest>, ReplyingMarkupSendMessageRequest>, TextableSendMessageRequest>, ThumbedSendMessageRequest> diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendMediaGroup.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendMediaGroup.kt index 2e6b92bb13..76ea3122fa 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendMediaGroup.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendMediaGroup.kt @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.requests.send.media import dev.inmo.tgbotapi.requests.abstracts.MultipartFile import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.common.CommonMultipartFileRequest +import dev.inmo.tgbotapi.requests.send.abstracts.SendContentMessageRequest import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest import dev.inmo.tgbotapi.requests.send.media.base.* import dev.inmo.tgbotapi.types.* @@ -157,7 +158,7 @@ data class SendMediaGroupData internal constructor( @SerialName(replyParametersField) override val replyParameters: ReplyParameters? = null, ) : DataRequest>>, - SendMessageRequest>> { + SendContentMessageRequest>> { @SerialName(mediaField) private val convertedMedia: String get() = buildJsonArray { diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendPhoto.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendPhoto.kt index b2444b1a97..2e7522cb16 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendPhoto.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendPhoto.kt @@ -124,7 +124,7 @@ data class SendPhotoData internal constructor( @SerialName(replyMarkupField) override val replyMarkup: KeyboardMarkup? = null ) : DataRequest>, - SendMessageRequest>, + SendContentMessageRequest>, ReplyingMarkupSendMessageRequest>, TextableSendMessageRequest>, OptionallyWithSpoilerRequest diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendSticker.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendSticker.kt index 060f146aef..73ae6ad935 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendSticker.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendSticker.kt @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.requests.send.media import dev.inmo.tgbotapi.requests.abstracts.* import dev.inmo.tgbotapi.requests.common.CommonMultipartFileRequest import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest +import dev.inmo.tgbotapi.requests.send.abstracts.SendContentMessageRequest import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId @@ -62,7 +63,7 @@ data class SendStickerByFileId internal constructor( override val replyParameters: ReplyParameters? = null, @SerialName(replyMarkupField) override val replyMarkup: KeyboardMarkup? = null -) : SendMessageRequest>, ReplyingMarkupSendMessageRequest> { +) : SendContentMessageRequest>, ReplyingMarkupSendMessageRequest> { override fun method(): String = "sendSticker" override val resultDeserializer: DeserializationStrategy> get() = commonResultDeserializer diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideo.kt index c4319937f8..3a6fa55530 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideo.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideo.kt @@ -162,7 +162,7 @@ data class SendVideoData internal constructor( @SerialName(replyMarkupField) override val replyMarkup: KeyboardMarkup? = null ) : DataRequest>, - SendMessageRequest>, + SendContentMessageRequest>, ReplyingMarkupSendMessageRequest>, TextableSendMessageRequest>, ThumbedSendMessageRequest>, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideoNote.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideoNote.kt index bc13b9e821..cfff79e7b2 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideoNote.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVideoNote.kt @@ -81,7 +81,7 @@ data class SendVideoNoteData internal constructor( @SerialName(replyMarkupField) override val replyMarkup: KeyboardMarkup? = null ) : DataRequest>, - SendMessageRequest>, + SendContentMessageRequest>, ReplyingMarkupSendMessageRequest>, ThumbedSendMessageRequest>, DuratedSendMessageRequest>, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVoice.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVoice.kt index 991f9bd88a..b6c140fd1c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVoice.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/media/SendVoice.kt @@ -130,7 +130,7 @@ data class SendVoiceData internal constructor( @SerialName(replyMarkupField) override val replyMarkup: KeyboardMarkup? = null ) : DataRequest>, - SendMessageRequest>, + SendContentMessageRequest>, ReplyingMarkupSendMessageRequest>, TextableSendMessageRequest>, DuratedSendMessageRequest> diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/payments/SendInvoice.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/payments/SendInvoice.kt index 796ff061a8..2e4effdf1b 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/payments/SendInvoice.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/payments/SendInvoice.kt @@ -61,8 +61,6 @@ data class SendInvoice( override val priceDependOnShipAddress: Boolean = false, @SerialName(messageThreadIdField) override val threadId: MessageThreadId? = chatId.threadId, - @SerialName(businessConnectionIdField) - override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, @SerialName(disableNotificationField) override val disableNotification: Boolean = false, @SerialName(protectContentField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/polls/SendPoll.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/polls/SendPoll.kt index 32b572d9ce..ee11db681f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/polls/SendPoll.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/polls/SendPoll.kt @@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.requests.send.polls import korlibs.time.DateTime import dev.inmo.tgbotapi.abstracts.TextedOutput import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest +import dev.inmo.tgbotapi.requests.send.abstracts.SendContentMessageRequest import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId @@ -156,7 +157,7 @@ private fun ScheduledCloseInfo.checkSendData() { } } -sealed class SendPoll : SendMessageRequest>, +sealed class SendPoll : SendContentMessageRequest>, ReplyingMarkupSendMessageRequest> { abstract val question: String abstract val options: List