1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-25 11:38:45 +00:00

cleanup in message contents

This commit is contained in:
InsanusMokrassar 2022-05-01 11:52:02 +06:00
parent 0273d07777
commit d0709a509f
101 changed files with 372 additions and 309 deletions

View File

@ -22,6 +22,11 @@ __All the `tgbotapi.extensions.*` packages have been removed__
* `dev.inmo.tgbotapi.types.UserSerializer` -> `dev.inmo.tgbotapi.types.chat.UserSerializer`
* **All `InputMedia` has been renamed as `TelegramMedia`. Migration:** `InputMedia` -> `TelegramMedia`
* `dev.inmo.tgbotapi.types.InputMedia` -> `dev.inmo.tgbotapi.types.media`
* **Replaces of `MessageContent`. Migrations:**
* `dev.inmo.tgbotapi.types.message.content.abstracts` -> `dev.inmo.tgbotapi.types.message.content`
* `dev.inmo.tgbotapi.types.message.content.media` -> `dev.inmo.tgbotapi.types.message.content`
* **`InvoiceContent` has been replaced: `dev.inmo.tgbotapi.types.message.payments.InvoiceContent` -> `dev.inmo.tgbotapi.types.message.content.InvoiceContent`**
* **`PossiblySentViaBotCommonMessage` has been replaced: `dev.inmo.tgbotapi.types.message.content.abstracts.PossiblySentViaBotCommonMessage` -> `dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage`**
* Constructor of `UnknownInlineKeyboardButton` is not internal and can be created with any `json` ([#563](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/563))
* All the interfaces from `dev.inmo.tgbotapi.types.files.abstracts` have been replaced to `dev.inmo.tgbotapi.types.files` and converted to sealed ([#550](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/550))
* `PassportFile` has been replaced to `dev.inmo.tgbotapi.types.files`

View File

@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.ParseMode.ParseMode
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
import dev.inmo.tgbotapi.types.message.content.MediaContent
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]

View File

@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
import dev.inmo.tgbotapi.types.message.content.MediaContent
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]

View File

@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.requests.DownloadFile
import dev.inmo.tgbotapi.requests.abstracts.FileId
import dev.inmo.tgbotapi.types.files.PathedFile
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
import dev.inmo.tgbotapi.types.message.content.MediaContent
suspend fun TelegramBot.downloadFile(
filePath: String

View File

@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.extensions.api.get.getFileAdditionalInfo
import dev.inmo.tgbotapi.requests.abstracts.FileId
import dev.inmo.tgbotapi.types.files.PathedFile
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
import dev.inmo.tgbotapi.types.message.content.MediaContent
suspend fun TelegramBot.downloadFileStream(
filePath: String

View File

@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.requests.DownloadFileStream
import dev.inmo.tgbotapi.requests.abstracts.FileId
import dev.inmo.tgbotapi.types.files.PathedFile
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
import dev.inmo.tgbotapi.types.message.content.MediaContent
suspend fun TelegramBot.downloadFileStreamAllocator(
filePath: String

View File

@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.abstracts.FileId
import dev.inmo.tgbotapi.requests.get.GetFile
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
import dev.inmo.tgbotapi.types.message.content.MediaContent
suspend fun TelegramBot.getFileAdditionalInfo(
fileId: FileId

View File

@ -9,7 +9,7 @@ import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.update.MediaGroupUpdates.SentMediaGroupUpdate
/**

View File

@ -23,8 +23,7 @@ import dev.inmo.tgbotapi.types.files.Sticker
import dev.inmo.tgbotapi.types.games.Game
import dev.inmo.tgbotapi.types.location.*
import dev.inmo.tgbotapi.types.message.abstracts.Message
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.media.*
import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.payments.LabeledPrice
import dev.inmo.tgbotapi.types.payments.abstracts.Currency
import dev.inmo.tgbotapi.types.polls.*

View File

@ -6,10 +6,10 @@ import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.media.*
import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.AudioContent
import dev.inmo.tgbotapi.types.message.content.media.DocumentContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.AudioContent
import dev.inmo.tgbotapi.types.message.content.DocumentContent
import dev.inmo.tgbotapi.utils.RiskFeature
import kotlin.jvm.JvmName

View File

@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.extensions.api.get.getFileAdditionalInfo
import dev.inmo.tgbotapi.requests.abstracts.FileId
import dev.inmo.tgbotapi.types.files.PathedFile
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
import dev.inmo.tgbotapi.types.message.content.MediaContent
import io.ktor.util.cio.use
import io.ktor.util.cio.writeChannel
import io.ktor.utils.io.copyTo

View File

@ -9,13 +9,11 @@ import dev.inmo.tgbotapi.extensions.utils.withContent
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.message.content.abstracts.*
import dev.inmo.tgbotapi.types.message.content.media.*
import dev.inmo.tgbotapi.types.message.content.media.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.payments.InvoiceContent
import dev.inmo.tgbotapi.types.message.content.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
import dev.inmo.tgbotapi.types.update.MediaGroupUpdates.SentMediaGroupUpdate
import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate
import kotlinx.coroutines.flow.Flow

View File

@ -9,13 +9,11 @@ import dev.inmo.tgbotapi.extensions.utils.withContent
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.message.content.abstracts.*
import dev.inmo.tgbotapi.types.message.content.media.*
import dev.inmo.tgbotapi.types.message.content.media.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.payments.InvoiceContent
import dev.inmo.tgbotapi.types.message.content.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
import dev.inmo.tgbotapi.types.update.MediaGroupUpdates.SentMediaGroupUpdate
import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate
import kotlinx.coroutines.flow.Flow

View File

@ -10,13 +10,11 @@ import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.message.content.abstracts.*
import dev.inmo.tgbotapi.types.message.content.media.*
import dev.inmo.tgbotapi.types.message.content.media.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.payments.InvoiceContent
import dev.inmo.tgbotapi.types.message.content.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
import dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate
import kotlinx.coroutines.flow.toList

View File

@ -4,12 +4,11 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.utils.asSentMediaGroupUpdate
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.*
import dev.inmo.tgbotapi.types.message.content.media.*
import dev.inmo.tgbotapi.types.message.content.media.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.message.content.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupContent
import dev.inmo.tgbotapi.utils.PreviewFeature
import kotlinx.coroutines.flow.take
import kotlinx.coroutines.flow.toList

View File

@ -1,10 +1,8 @@
package dev.inmo.tgbotapi.extensions.behaviour_builder.filters
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver
import dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.CommonMessageFilter
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
import dev.inmo.tgbotapi.types.message.abstracts.*
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.update.abstracts.Update
/**

View File

@ -12,11 +12,9 @@ import dev.inmo.tgbotapi.extensions.utils.whenCommonMessage
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.message.content.abstracts.*
import dev.inmo.tgbotapi.types.message.content.media.*
import dev.inmo.tgbotapi.types.message.content.media.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.payments.InvoiceContent
import dev.inmo.tgbotapi.types.message.content.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
import dev.inmo.tgbotapi.types.update.MediaGroupUpdates.SentMediaGroupUpdate
import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate
import dev.inmo.tgbotapi.types.update.abstracts.Update

View File

@ -26,10 +26,12 @@ import dev.inmo.tgbotapi.types.files.TelegramMediaFile
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.message.content.abstracts.*
import dev.inmo.tgbotapi.types.message.content.media.*
import dev.inmo.tgbotapi.types.message.content.media.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.payments.InvoiceContent
import dev.inmo.tgbotapi.types.message.content.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
import dev.inmo.tgbotapi.types.message.content.MediaCollectionContent
import dev.inmo.tgbotapi.types.message.content.MediaContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
import dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate
import dev.inmo.tgbotapi.types.update.abstracts.Update
import dev.inmo.tgbotapi.utils.PreviewFeature

View File

@ -9,11 +9,7 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByC
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
import dev.inmo.tgbotapi.extensions.utils.asSentMediaGroupUpdate
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
import dev.inmo.tgbotapi.types.message.content.media.*
import dev.inmo.tgbotapi.types.message.content.media.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.update.abstracts.Update
import dev.inmo.tgbotapi.utils.PreviewFeature

View File

@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
import kotlinx.serialization.*
const val editMessageReplyMarkupMethod = "editMessageReplyMarkup"

View File

@ -3,6 +3,6 @@ package dev.inmo.tgbotapi.requests.edit.abstracts
import dev.inmo.tgbotapi.CommonAbstracts.types.MessageAction
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
interface EditChatMessage<MT: MessageContent> : SimpleRequest<ContentMessage<MT>>, MessageAction

View File

@ -9,7 +9,7 @@ import dev.inmo.tgbotapi.types.ParseMode.ParseMode
import dev.inmo.tgbotapi.types.ParseMode.parseModeField
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
import dev.inmo.tgbotapi.types.message.content.MediaContent
import dev.inmo.tgbotapi.utils.extensions.makeString
import kotlinx.serialization.*

View File

@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.media.TelegramMedia
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
import dev.inmo.tgbotapi.types.message.content.MediaContent
import kotlinx.serialization.*
const val editMessageMediaMethod = "editMessageMedia"

View File

@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.ParseMode.parseModeField
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import dev.inmo.tgbotapi.types.message.content.media.AnimationContent
import dev.inmo.tgbotapi.types.message.content.AnimationContent
import dev.inmo.tgbotapi.utils.extensions.makeString
import dev.inmo.tgbotapi.utils.mapOfNotNull
import dev.inmo.tgbotapi.utils.throwRangeError

View File

@ -12,7 +12,7 @@ import dev.inmo.tgbotapi.types.ParseMode.parseModeField
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import dev.inmo.tgbotapi.types.message.content.media.AudioContent
import dev.inmo.tgbotapi.types.message.content.AudioContent
import dev.inmo.tgbotapi.utils.extensions.makeString
import dev.inmo.tgbotapi.utils.mapOfNotNull
import dev.inmo.tgbotapi.utils.throwRangeError

View File

@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.ParseMode.parseModeField
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import dev.inmo.tgbotapi.types.message.content.media.DocumentContent
import dev.inmo.tgbotapi.types.message.content.DocumentContent
import dev.inmo.tgbotapi.utils.extensions.makeString
import dev.inmo.tgbotapi.utils.mapOfNotNull
import dev.inmo.tgbotapi.utils.throwRangeError

View File

@ -8,10 +8,10 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.media.*
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializerClass
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.AudioContent
import dev.inmo.tgbotapi.types.message.content.media.DocumentContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.AudioContent
import dev.inmo.tgbotapi.types.message.content.DocumentContent
import dev.inmo.tgbotapi.utils.*
import kotlinx.serialization.*
import kotlinx.serialization.builtins.ListSerializer

View File

@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.ParseMode.parseModeField
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import dev.inmo.tgbotapi.types.message.content.media.PhotoContent
import dev.inmo.tgbotapi.types.message.content.PhotoContent
import dev.inmo.tgbotapi.utils.extensions.makeString
import dev.inmo.tgbotapi.utils.throwRangeError
import kotlinx.serialization.*

View File

@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import dev.inmo.tgbotapi.types.message.content.media.StickerContent
import dev.inmo.tgbotapi.types.message.content.StickerContent
import dev.inmo.tgbotapi.utils.toJsonWithoutNulls
import kotlinx.serialization.*
import kotlinx.serialization.json.JsonObject

View File

@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.ParseMode.parseModeField
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import dev.inmo.tgbotapi.types.message.content.media.VideoContent
import dev.inmo.tgbotapi.types.message.content.VideoContent
import dev.inmo.tgbotapi.utils.extensions.makeString
import dev.inmo.tgbotapi.utils.mapOfNotNull
import dev.inmo.tgbotapi.utils.throwRangeError

View File

@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import dev.inmo.tgbotapi.types.message.content.media.VideoNoteContent
import dev.inmo.tgbotapi.types.message.content.VideoNoteContent
import dev.inmo.tgbotapi.utils.mapOfNotNull
import kotlinx.serialization.*

View File

@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.ParseMode.parseModeField
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import dev.inmo.tgbotapi.types.message.content.media.VoiceContent
import dev.inmo.tgbotapi.types.message.content.VoiceContent
import dev.inmo.tgbotapi.utils.extensions.makeString
import dev.inmo.tgbotapi.utils.mapOfNotNull
import dev.inmo.tgbotapi.utils.throwRangeError

View File

@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import dev.inmo.tgbotapi.types.message.payments.InvoiceContent
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
import dev.inmo.tgbotapi.types.payments.LabeledPrice
import dev.inmo.tgbotapi.types.payments.LabeledPricesSerializer
import dev.inmo.tgbotapi.types.payments.abstracts.Currency

View File

@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.ChannelChat
import dev.inmo.tgbotapi.types.chat.CommonBot
import dev.inmo.tgbotapi.types.message.abstracts.*
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
data class ChannelContentMessageImpl<T: MessageContent>(
override val messageId: MessageIdentifier,

View File

@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
import dev.inmo.tgbotapi.types.message.abstracts.Message
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
data class ChannelMediaGroupMessage<T : MediaGroupContent>(
override val messageId: MessageIdentifier,

View File

@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.message.abstracts.*
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
data class CommonMediaGroupMessage<T : MediaGroupContent>(
override val messageId: MessageIdentifier,

View File

@ -7,7 +7,7 @@ import dev.inmo.tgbotapi.types.chat.*
import dev.inmo.tgbotapi.types.chat.CommonBot
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.message.abstracts.*
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
data class ConnectedFromChannelGroupContentMessageImpl<T : MessageContent>(
override val chat: GroupChat,

View File

@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.chat.CommonBot
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.message.abstracts.Message
import dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
data class PrivateContentMessageImpl<T: MessageContent>(
override val messageId: MessageIdentifier,

View File

@ -17,8 +17,8 @@ import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.*
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.*
import dev.inmo.tgbotapi.types.message.abstracts.*
import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.media.*
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
import dev.inmo.tgbotapi.types.message.payments.*
import dev.inmo.tgbotapi.types.passport.PassportData
import dev.inmo.tgbotapi.types.payments.Invoice

View File

@ -1,8 +1,7 @@
package dev.inmo.tgbotapi.types.message.abstracts
import dev.inmo.tgbotapi.types.chat.ChannelChat
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.abstracts.PossiblySentViaBotCommonMessage
import dev.inmo.tgbotapi.types.message.content.MessageContent
interface ChannelContentMessage<T: MessageContent> : PossiblySentViaBotCommonMessage<T>, SignedMessage, WithSenderChatMessage {
override val chat: ChannelChat

View File

@ -1,6 +1,6 @@
package dev.inmo.tgbotapi.types.message.abstracts
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
interface CommonMessage<T: MessageContent> : Message,
PossiblyForwardedMessage,

View File

@ -1,6 +1,6 @@
package dev.inmo.tgbotapi.types.message.abstracts
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
interface ContentMessage<T: MessageContent>: Message {
val hasProtectedContent: Boolean

View File

@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.types.message.abstracts
import dev.inmo.tgbotapi.types.chat.ChannelChat
import dev.inmo.tgbotapi.types.chat.GroupChat
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
interface GroupContentMessage<T : MessageContent> : PublicContentMessage<T> {
override val chat: GroupChat

View File

@ -1,7 +1,7 @@
package dev.inmo.tgbotapi.types.message.abstracts
import dev.inmo.tgbotapi.types.MediaGroupIdentifier
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
interface MediaGroupMessage<T : MediaGroupContent> : CommonMessage<T> {
val mediaGroupId: MediaGroupIdentifier

View File

@ -0,0 +1,5 @@
package dev.inmo.tgbotapi.types.message.abstracts
import dev.inmo.tgbotapi.types.message.content.MessageContent
interface PossiblySentViaBotCommonMessage<T: MessageContent> : CommonMessage<T>, PossiblySentViaBot

View File

@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.types.message.abstracts
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.abstracts.PossiblySentViaBotCommonMessage
import dev.inmo.tgbotapi.types.message.content.MessageContent
interface PrivateContentMessage<T: MessageContent> : PossiblySentViaBotCommonMessage<T>, FromUserMessage

View File

@ -1,8 +1,7 @@
package dev.inmo.tgbotapi.types.message.abstracts
import dev.inmo.tgbotapi.types.chat.PublicChat
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.abstracts.PossiblySentViaBotCommonMessage
import dev.inmo.tgbotapi.types.message.content.MessageContent
interface PublicContentMessage<T: MessageContent> : PossiblySentViaBotCommonMessage<T> {
override val chat: PublicChat

View File

@ -0,0 +1,122 @@
package dev.inmo.tgbotapi.types.message.content
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
import dev.inmo.tgbotapi.types.media.TelegramMedia
import dev.inmo.tgbotapi.types.message.abstracts.*
import dev.inmo.tgbotapi.utils.RiskFeature
import kotlinx.serialization.modules.*
sealed interface MessageContent: ResendableContent {
companion object {
@RiskFeature("This serialization module can be changed in near releases")
fun serializationModule(
visualMediaGroupContentAdditionalBuilder: PolymorphicModuleBuilder<VisualMediaGroupContent>.() -> Unit = {},
documentMediaGroupContentAdditionalBuilder: PolymorphicModuleBuilder<DocumentMediaGroupContent>.() -> Unit = {},
audioMediaGroupContentAdditionalBuilder: PolymorphicModuleBuilder<AudioMediaGroupContent>.() -> Unit = {},
mediaGroupContentAdditionalBuilder: PolymorphicModuleBuilder<MediaGroupContent>.() -> Unit = {},
textedMediaContentAdditionalBuilder: PolymorphicModuleBuilder<TextedMediaContent>.() -> Unit = {},
mediaContentAdditionalBuilder: PolymorphicModuleBuilder<MediaContent>.() -> Unit = {},
mediaCollectionContentAdditionalBuilder: PolymorphicModuleBuilder<MediaCollectionContent<*>>.() -> Unit = {},
additionalBuilder: PolymorphicModuleBuilder<MessageContent>.() -> Unit = {}
) = SerializersModule {
polymorphic(MessageContent::class) {
subclass(ContactContent::class)
subclass(VenueContent::class)
subclass(PollContent::class)
subclass(DiceContent::class)
subclass(TextContent::class)
subclass(LocationContent::class, LocationContentSerializer)
subclass(PhotoContent::class)
subclass(VideoContent::class)
subclass(AudioContent::class)
subclass(DocumentContent::class)
subclass(VoiceContent::class)
subclass(VideoNoteContent::class)
subclass(AnimationContent::class)
subclass(StickerContent::class)
subclass(InvoiceContent::class)
additionalBuilder()
}
polymorphic(MediaCollectionContent::class) {
subclass(PhotoContent::class)
mediaCollectionContentAdditionalBuilder()
}
polymorphic(MediaContent::class) {
subclass(VideoNoteContent::class)
subclass(VideoContent::class)
subclass(StickerContent::class)
subclass(PhotoContent::class)
subclass(VoiceContent::class)
subclass(AnimationContent::class)
subclass(AudioContent::class)
subclass(DocumentContent::class)
mediaContentAdditionalBuilder()
}
polymorphic(TextedMediaContent::class) {
subclass(PhotoContent::class)
subclass(VoiceContent::class)
subclass(AnimationContent::class)
subclass(AudioContent::class)
subclass(DocumentContent::class)
textedMediaContentAdditionalBuilder()
}
polymorphic(MediaGroupContent::class) {
subclass(PhotoContent::class)
subclass(AudioContent::class)
subclass(DocumentContent::class)
mediaGroupContentAdditionalBuilder()
}
polymorphic(AudioMediaGroupContent::class) {
subclass(AudioContent::class)
audioMediaGroupContentAdditionalBuilder()
}
polymorphic(DocumentMediaGroupContent::class) {
subclass(DocumentContent::class)
documentMediaGroupContentAdditionalBuilder()
}
polymorphic(VisualMediaGroupContent::class) {
subclass(PhotoContent::class)
subclass(VideoContent::class)
visualMediaGroupContentAdditionalBuilder()
}
}
}
}
sealed interface MediaCollectionContent<T: TelegramMediaFile>: MessageContent, MediaContent {
val mediaCollection: List<T>
}
sealed interface MediaContent: MessageContent {
val media: TelegramMediaFile
fun asTelegramMedia(): TelegramMedia
@Deprecated("Renamed", ReplaceWith("asTelegramMedia()"))
fun asInputMedia(): TelegramMedia = asTelegramMedia()
}
sealed interface ResendableContent {
fun createResend(
chatId: ChatIdentifier,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): Request<out Message>
}

View File

@ -0,0 +1,30 @@
package dev.inmo.tgbotapi.types.message.content
import dev.inmo.tgbotapi.CommonAbstracts.TextedInput
import dev.inmo.tgbotapi.types.files.AudioFile
import dev.inmo.tgbotapi.types.files.DocumentFile
import dev.inmo.tgbotapi.types.media.*
sealed interface AudioMediaGroupContent : MediaGroupContent {
override val media: AudioFile
override fun toMediaGroupMemberTelegramMedia(): AudioMediaGroupMemberTelegramMedia
}
sealed interface DocumentMediaGroupContent : MediaGroupContent {
override val media: DocumentFile
override fun toMediaGroupMemberTelegramMedia(): DocumentMediaGroupMemberTelegramMedia
}
sealed interface MediaGroupContent : TextedMediaContent {
fun toMediaGroupMemberTelegramMedia(): MediaGroupMemberTelegramMedia
@Deprecated("Renamed", ReplaceWith("toMediaGroupMemberTelegramMedia()"))
fun toMediaGroupMemberInputMedia(): MediaGroupMemberTelegramMedia = toMediaGroupMemberTelegramMedia()
}
sealed interface TextedMediaContent : MediaContent, TextedInput
sealed interface VisualMediaGroupContent : MediaGroupContent {
override fun toMediaGroupMemberTelegramMedia(): VisualMediaGroupMemberTelegramMedia
}

View File

@ -1,4 +1,4 @@
package dev.inmo.tgbotapi.types.message.content.media
package dev.inmo.tgbotapi.types.message.content
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.requests.send.media.SendAnimation

View File

@ -1,4 +1,4 @@
package dev.inmo.tgbotapi.types.message.content.media
package dev.inmo.tgbotapi.types.message.content
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.requests.send.media.SendAudio

View File

@ -5,7 +5,6 @@ import dev.inmo.tgbotapi.requests.send.SendContact
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import kotlinx.serialization.Serializable
@Serializable

View File

@ -7,7 +7,6 @@ import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.dice.Dice
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import kotlinx.serialization.Serializable
@Serializable

View File

@ -1,4 +1,4 @@
package dev.inmo.tgbotapi.types.message.content.media
package dev.inmo.tgbotapi.types.message.content
import dev.inmo.tgbotapi.CommonAbstracts.TextedInput
import dev.inmo.tgbotapi.requests.abstracts.Request
@ -12,7 +12,6 @@ import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.files.DocumentFile
import dev.inmo.tgbotapi.types.files.asDocumentFile
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
import kotlinx.serialization.Serializable
@Serializable

View File

@ -7,7 +7,6 @@ import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.games.Game
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import kotlinx.serialization.Serializable
@Serializable

View File

@ -0,0 +1,26 @@
package dev.inmo.tgbotapi.types.message.content
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.payments.Invoice
import kotlinx.serialization.Serializable
@Serializable
data class InvoiceContent(
val invoice: Invoice
) : MessageContent {
override fun createResend(
chatId: ChatIdentifier,
disableNotification: Boolean,
protectContent: Boolean,
replyToMessageId: MessageIdentifier?,
allowSendingWithoutReply: Boolean?,
replyMarkup: KeyboardMarkup?
): Request<ContentMessage<InvoiceContent>> {
error("Unfortunately, currently InvoiceOfPayment can not be resend due to requirement of additional parameters," +
" which can't be provided during the call of this method")
}
}

View File

@ -9,7 +9,6 @@ import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.location.*
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import kotlinx.serialization.*
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.descriptors.buildClassSerialDescriptor

View File

@ -1,4 +1,4 @@
package dev.inmo.tgbotapi.types.message.content.media
package dev.inmo.tgbotapi.types.message.content
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.requests.send.media.SendPhoto
@ -10,7 +10,6 @@ import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.files.*
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaCollectionContent
import kotlinx.serialization.Serializable
@Serializable

View File

@ -6,7 +6,6 @@ import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.polls.Poll
import kotlinx.serialization.Serializable

View File

@ -1,4 +1,4 @@
package dev.inmo.tgbotapi.types.message.content.media
package dev.inmo.tgbotapi.types.message.content
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.requests.send.media.SendSticker
@ -8,7 +8,6 @@ import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.files.Sticker
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
import kotlinx.serialization.Serializable
@Serializable

View File

@ -8,7 +8,6 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import kotlinx.serialization.Serializable
@Serializable

View File

@ -6,7 +6,6 @@ import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.venue.Venue
import kotlinx.serialization.Serializable

View File

@ -1,4 +1,4 @@
package dev.inmo.tgbotapi.types.message.content.media
package dev.inmo.tgbotapi.types.message.content
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.requests.send.media.SendVideo

View File

@ -1,4 +1,4 @@
package dev.inmo.tgbotapi.types.message.content.media
package dev.inmo.tgbotapi.types.message.content
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.requests.send.media.SendVideoNote
@ -8,7 +8,6 @@ import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.files.VideoNoteFile
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
import kotlinx.serialization.Serializable
@Serializable

View File

@ -1,4 +1,4 @@
package dev.inmo.tgbotapi.types.message.content.media
package dev.inmo.tgbotapi.types.message.content
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.requests.send.media.SendVoice

View File

@ -1,4 +0,0 @@
package dev.inmo.tgbotapi.types.message.content.abstracts
@Deprecated("This class has been moved to the other package", ReplaceWith("AudioMediaGroupContent", "dev.inmo.tgbotapi.types.message.content.media.AudioMediaGroupContent"))
typealias AudioMediaGroupContent = dev.inmo.tgbotapi.types.message.content.media.AudioMediaGroupContent

View File

@ -1,4 +0,0 @@
package dev.inmo.tgbotapi.types.message.content.abstracts
@Deprecated("This class has been moved to the other package", ReplaceWith("DocumentMediaGroupContent", "dev.inmo.tgbotapi.types.message.content.media.DocumentMediaGroupContent"))
typealias DocumentMediaGroupContent = dev.inmo.tgbotapi.types.message.content.media.DocumentMediaGroupContent

View File

@ -1,7 +0,0 @@
package dev.inmo.tgbotapi.types.message.content.abstracts
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
interface MediaCollectionContent<T: TelegramMediaFile>: MessageContent, MediaContent {
val mediaCollection: List<T>
}

View File

@ -1,11 +0,0 @@
package dev.inmo.tgbotapi.types.message.content.abstracts
import dev.inmo.tgbotapi.types.media.TelegramMedia
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
interface MediaContent: MessageContent {
val media: TelegramMediaFile
fun asTelegramMedia(): TelegramMedia
@Deprecated("Renamed", ReplaceWith("asTelegramMedia()"))
fun asInputMedia(): TelegramMedia = asTelegramMedia()
}

View File

@ -1,4 +0,0 @@
package dev.inmo.tgbotapi.types.message.content.abstracts
@Deprecated("This class has been moved to the other package", ReplaceWith("MediaGroupContent", "dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent"))
typealias MediaGroupContent = dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent

View File

@ -1,40 +0,0 @@
package dev.inmo.tgbotapi.types.message.content.abstracts
import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.message.content.media.*
import dev.inmo.tgbotapi.types.message.payments.InvoiceContent
import dev.inmo.tgbotapi.utils.RiskFeature
import kotlinx.serialization.modules.*
interface MessageContent: ResendableContent {
companion object {
@RiskFeature("This serialization module can be changed in near releases")
fun serializationModule(
additionalBuilder: PolymorphicModuleBuilder<MessageContent>.() -> Unit = {}
) = SerializersModule {
polymorphic(MessageContent::class) {
subclass(ContactContent::class)
subclass(VenueContent::class)
subclass(PollContent::class)
subclass(DiceContent::class)
subclass(TextContent::class)
subclass(LocationContent::class, LocationContentSerializer)
subclass(PhotoContent::class)
subclass(VideoContent::class)
subclass(AudioContent::class)
subclass(DocumentContent::class)
subclass(VoiceContent::class)
subclass(VideoNoteContent::class)
subclass(AnimationContent::class)
subclass(StickerContent::class)
subclass(InvoiceContent::class)
additionalBuilder()
}
}
}
}

View File

@ -1,6 +0,0 @@
package dev.inmo.tgbotapi.types.message.content.abstracts
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBot
interface PossiblySentViaBotCommonMessage<T: MessageContent> : CommonMessage<T>, PossiblySentViaBot

View File

@ -1,18 +0,0 @@
package dev.inmo.tgbotapi.types.message.content.abstracts
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.Message
interface ResendableContent {
fun createResend(
chatId: ChatIdentifier,
disableNotification: Boolean = false,
protectContent: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): Request<out Message>
}

View File

@ -0,0 +1,25 @@
package dev.inmo.tgbotapi.types.message.content.abstracts
@Deprecated("This class has been moved to the other package", ReplaceWith("AudioMediaGroupContent", "dev.inmo.tgbotapi.types.message.content.AudioMediaGroupContent"))
typealias AudioMediaGroupContent = dev.inmo.tgbotapi.types.message.content.AudioMediaGroupContent
@Deprecated("This class has been moved to the other package", ReplaceWith("DocumentMediaGroupContent", "dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupContent"))
typealias DocumentMediaGroupContent = dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupContent
@Deprecated("This class has been moved to the other package", ReplaceWith("VisualMediaGroupContent", "dev.inmo.tgbotapi.types.message.content.VisualMediaGroupContent"))
typealias VisualMediaGroupContent = dev.inmo.tgbotapi.types.message.content.VisualMediaGroupContent
@Deprecated("This class has been moved to the other package", ReplaceWith("MediaCollectionContent", "dev.inmo.tgbotapi.types.message.content.MediaCollectionContent"))
typealias MediaCollectionContent<T> = dev.inmo.tgbotapi.types.message.content.MediaCollectionContent<T>
@Deprecated("This class has been moved to the other package", ReplaceWith("MediaContent", "dev.inmo.tgbotapi.types.message.content.MediaContent"))
typealias MediaContent = dev.inmo.tgbotapi.types.message.content.MediaContent
@Deprecated("This class has been moved to the other package", ReplaceWith("MessageContent", "dev.inmo.tgbotapi.types.message.content.MessageContent"))
typealias MessageContent = dev.inmo.tgbotapi.types.message.content.MessageContent
@Deprecated("This class has been moved to the other package", ReplaceWith("PossiblySentViaBotCommonMessage", "dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage"))
typealias PossiblySentViaBotCommonMessage<T> = dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage<T>
@Deprecated("This class has been moved to the other package", ReplaceWith("ResendableContent", "dev.inmo.tgbotapi.types.message.content.ResendableContent"))
typealias ResendableContent = dev.inmo.tgbotapi.types.message.content.ResendableContent

View File

@ -1,4 +0,0 @@
package dev.inmo.tgbotapi.types.message.content.abstracts
@Deprecated("This class has been moved to the other package", ReplaceWith("VisualMediaGroupContent", "dev.inmo.tgbotapi.types.message.content.media.VisualMediaGroupContent"))
typealias VisualMediaGroupContent = dev.inmo.tgbotapi.types.message.content.media.VisualMediaGroupContent

View File

@ -1,10 +0,0 @@
package dev.inmo.tgbotapi.types.message.content.media
import dev.inmo.tgbotapi.types.media.AudioMediaGroupMemberTelegramMedia
import dev.inmo.tgbotapi.types.files.AudioFile
interface AudioMediaGroupContent : MediaGroupContent {
override val media: AudioFile
override fun toMediaGroupMemberTelegramMedia(): AudioMediaGroupMemberTelegramMedia
}

View File

@ -1,10 +0,0 @@
package dev.inmo.tgbotapi.types.message.content.media
import dev.inmo.tgbotapi.types.media.*
import dev.inmo.tgbotapi.types.files.DocumentFile
interface DocumentMediaGroupContent : MediaGroupContent {
override val media: DocumentFile
override fun toMediaGroupMemberTelegramMedia(): DocumentMediaGroupMemberTelegramMedia
}

View File

@ -1,9 +0,0 @@
package dev.inmo.tgbotapi.types.message.content.media
import dev.inmo.tgbotapi.types.media.MediaGroupMemberTelegramMedia
interface MediaGroupContent : TextedMediaContent {
fun toMediaGroupMemberTelegramMedia(): MediaGroupMemberTelegramMedia
@Deprecated("Renamed", ReplaceWith("toMediaGroupMemberTelegramMedia()"))
fun toMediaGroupMemberInputMedia(): MediaGroupMemberTelegramMedia = toMediaGroupMemberTelegramMedia()
}

View File

@ -1,6 +0,0 @@
package dev.inmo.tgbotapi.types.message.content.media
import dev.inmo.tgbotapi.CommonAbstracts.TextedInput
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
sealed interface TextedMediaContent : MediaContent, TextedInput

View File

@ -0,0 +1,44 @@
package dev.inmo.tgbotapi.types.message.content.media
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
import dev.inmo.tgbotapi.types.message.content.asDocumentContent
@Deprecated("This class has been moved to the other package", ReplaceWith("VoiceContent", "dev.inmo.tgbotapi.types.message.content.VoiceContent"))
typealias VoiceContent = dev.inmo.tgbotapi.types.message.content.VoiceContent
@Deprecated("This class has been moved to the other package", ReplaceWith("VisualMediaGroupContent", "dev.inmo.tgbotapi.types.message.content.VisualMediaGroupContent"))
typealias VisualMediaGroupContent = dev.inmo.tgbotapi.types.message.content.VisualMediaGroupContent
@Deprecated("This class has been moved to the other package", ReplaceWith("VideoNoteContent", "dev.inmo.tgbotapi.types.message.content.VideoNoteContent"))
typealias VideoNoteContent = dev.inmo.tgbotapi.types.message.content.VideoNoteContent
@Deprecated("This class has been moved to the other package", ReplaceWith("VideoContent", "dev.inmo.tgbotapi.types.message.content.VideoContent"))
typealias VideoContent = dev.inmo.tgbotapi.types.message.content.VideoContent
@Deprecated("This class has been moved to the other package", ReplaceWith("TextedMediaContent", "dev.inmo.tgbotapi.types.message.content.TextedMediaContent"))
typealias TextedMediaContent = dev.inmo.tgbotapi.types.message.content.TextedMediaContent
@Deprecated("This class has been moved to the other package", ReplaceWith("StickerContent", "dev.inmo.tgbotapi.types.message.content.StickerContent"))
typealias StickerContent = dev.inmo.tgbotapi.types.message.content.StickerContent
@Deprecated("This class has been moved to the other package", ReplaceWith("PhotoContent", "dev.inmo.tgbotapi.types.message.content.PhotoContent"))
typealias PhotoContent = dev.inmo.tgbotapi.types.message.content.PhotoContent
@Deprecated("This class has been moved to the other package", ReplaceWith("DocumentMediaGroupContent", "dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupContent"))
typealias DocumentMediaGroupContent = dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupContent
@Deprecated("This class has been moved to the other package", ReplaceWith("DocumentContent", "dev.inmo.tgbotapi.types.message.content.DocumentContent"))
typealias DocumentContent = dev.inmo.tgbotapi.types.message.content.DocumentContent
@Deprecated("This class has been moved to the other package", ReplaceWith("asDocumentContent", "dev.inmo.tgbotapi.types.message.content.asDocumentContent"))
inline fun MediaContent.asDocumentContent() = asDocumentContent()
@Deprecated("This class has been moved to the other package", ReplaceWith("AudioMediaGroupContent", "dev.inmo.tgbotapi.types.message.content.AudioMediaGroupContent"))
typealias AudioMediaGroupContent = dev.inmo.tgbotapi.types.message.content.AudioMediaGroupContent
@Deprecated("This class has been moved to the other package", ReplaceWith("AudioContent", "dev.inmo.tgbotapi.types.message.content.AudioContent"))
typealias AudioContent = dev.inmo.tgbotapi.types.message.content.AudioContent
@Deprecated("This class has been moved to the other package", ReplaceWith("AnimationContent", "dev.inmo.tgbotapi.types.message.content.AnimationContent"))
typealias AnimationContent = dev.inmo.tgbotapi.types.message.content.AnimationContent

View File

@ -1,7 +0,0 @@
package dev.inmo.tgbotapi.types.message.content.media
import dev.inmo.tgbotapi.types.media.VisualMediaGroupMemberTelegramMedia
interface VisualMediaGroupContent : MediaGroupContent {
override fun toMediaGroupMemberTelegramMedia(): VisualMediaGroupMemberTelegramMedia
}

View File

@ -1,27 +1,4 @@
package dev.inmo.tgbotapi.types.message.payments
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.payments.Invoice
import kotlinx.serialization.Serializable
@Serializable
data class InvoiceContent(
val invoice: Invoice
) : MessageContent {
override fun createResend(
chatId: ChatIdentifier,
disableNotification: Boolean,
protectContent: Boolean,
replyToMessageId: MessageIdentifier?,
allowSendingWithoutReply: Boolean?,
replyMarkup: KeyboardMarkup?
): Request<ContentMessage<InvoiceContent>> {
error("Unfortunately, currently InvoiceOfPayment can not be resend due to requirement of additional parameters," +
" which can't be provided during the call of this method")
}
}
@Deprecated("This class has been moved to the other package", ReplaceWith("InvoiceContent", "dev.inmo.tgbotapi.types.message.content.InvoiceContent"))
typealias InvoiceContent = dev.inmo.tgbotapi.types.message.content.InvoiceContent

View File

@ -1,7 +1,7 @@
package dev.inmo.tgbotapi.types.queries.callback
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
sealed interface MessageCallbackQuery : CallbackQuery {
val message: ContentMessage<MessageContent>

View File

@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.types.queries.callback
import dev.inmo.tgbotapi.types.CallbackQueryIdentifier
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
data class MessageDataCallbackQuery(
override val id: CallbackQueryIdentifier,

View File

@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.types.queries.callback
import dev.inmo.tgbotapi.types.CallbackQueryIdentifier
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
data class MessageGameShortNameCallbackQuery(
override val id: CallbackQueryIdentifier,

View File

@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.message.abstracts.*
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

View File

@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.types.update.MediaGroupUpdates
import dev.inmo.tgbotapi.types.UpdateIdentifier
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.update.abstracts.BaseMessageUpdate
data class ChannelPostMediaGroupUpdate(

View File

@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.types.update.MediaGroupUpdates
import dev.inmo.tgbotapi.types.UpdateIdentifier
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.update.EditChannelPostUpdate
data class EditChannelPostMediaGroupUpdate(

View File

@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.types.update.MediaGroupUpdates
import dev.inmo.tgbotapi.types.UpdateIdentifier
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.update.EditMessageUpdate
data class EditMessageMediaGroupUpdate(

View File

@ -1,7 +1,7 @@
package dev.inmo.tgbotapi.types.update.MediaGroupUpdates
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.update.abstracts.*
/**

View File

@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.types.update.MediaGroupUpdates
import dev.inmo.tgbotapi.types.UpdateIdentifier
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.update.abstracts.BaseMessageUpdate
data class MessageMediaGroupUpdate(

View File

@ -3,7 +3,7 @@ package dev.inmo.tgbotapi
import dev.inmo.tgbotapi.requests.abstracts.toInputFile
import dev.inmo.tgbotapi.types.media.MediaGroupMemberTelegramMediaSerializer
import dev.inmo.tgbotapi.types.files.PhotoSize
import dev.inmo.tgbotapi.types.message.content.media.PhotoContent
import dev.inmo.tgbotapi.types.message.content.PhotoContent
import kotlinx.serialization.json.Json
import kotlin.test.Test
import kotlin.test.assertEquals

View File

@ -47,13 +47,11 @@ import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.*
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.*
import dev.inmo.tgbotapi.types.message.abstracts.*
import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.message.content.abstracts.*
import dev.inmo.tgbotapi.types.message.content.media.*
import dev.inmo.tgbotapi.types.message.content.media.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.payments.InvoiceContent
import dev.inmo.tgbotapi.types.message.content.AudioMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
import dev.inmo.tgbotapi.types.message.payments.SuccessfulPaymentEvent
import dev.inmo.tgbotapi.types.passport.*
import dev.inmo.tgbotapi.types.passport.decrypted.*

View File

@ -1,8 +1,8 @@
package dev.inmo.tgbotapi.extensions.utils
import dev.inmo.tgbotapi.types.message.abstracts.*
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.abstracts.PossiblySentViaBotCommonMessage
import dev.inmo.tgbotapi.types.message.content.MessageContent
import dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage
import kotlinx.coroutines.flow.*
/**

View File

@ -2,9 +2,8 @@ package dev.inmo.tgbotapi.extensions.utils
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.media.*
import dev.inmo.tgbotapi.types.message.payments.InvoiceContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.mapNotNull

View File

@ -3,8 +3,9 @@
package dev.inmo.tgbotapi.extensions.utils
import dev.inmo.tgbotapi.types.message.abstracts.*
import dev.inmo.tgbotapi.types.message.content.abstracts.*
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
import dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
inline fun <reified T : MessageContent> ContentMessage<*>.withContent() = if (content is T) { this as ContentMessage<T> } else { null }
inline fun <reified T : MessageContent> ContentMessage<*>.requireWithContent() = withContent<T>()!!
@ -12,7 +13,8 @@ inline fun <reified T : MessageContent> ContentMessage<*>.requireWithContent() =
inline fun <reified T : MessageContent> CommonMessage<*>.withContent() = if (content is T) { this as CommonMessage<T> } else { null }
inline fun <reified T : MessageContent> CommonMessage<*>.requireWithContent() = withContent<T>()!!
inline fun <reified T : MessageContent> PossiblySentViaBotCommonMessage<*>.withContent() = if (content is T) { this as PossiblySentViaBotCommonMessage<T> } else { null }
inline fun <reified T : MessageContent> PossiblySentViaBotCommonMessage<*>.withContent() = if (content is T) { this as PossiblySentViaBotCommonMessage<T>
} else { null }
inline fun <reified T : MessageContent> PossiblySentViaBotCommonMessage<*>.requireWithContent() = withContent<T>()!!
inline fun <reified T : MessageContent> ChannelContentMessage<*>.withContent() = if (content is T) { this as ChannelContentMessage<T> } else { null }

View File

@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.extensions.utils.*
import dev.inmo.tgbotapi.types.queries.callback.CallbackQuery
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
import dev.inmo.tgbotapi.utils.RiskFeature
@RiskFeature(RawFieldsUsageWarning)

View File

@ -6,11 +6,9 @@ import dev.inmo.tgbotapi.extensions.utils.updates.asContentMessagesFlow
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.message.content.abstracts.*
import dev.inmo.tgbotapi.types.message.content.media.*
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.media.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.payments.InvoiceContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupContent
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
import dev.inmo.tgbotapi.types.update.MediaGroupUpdates.SentMediaGroupUpdate
import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate
import dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter

View File

@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.ForwardInfo
import dev.inmo.tgbotapi.types.message.abstracts.*
import dev.inmo.tgbotapi.types.message.content.media.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.update.MediaGroupUpdates.SentMediaGroupUpdate
val List<CommonMessage<out MediaGroupContent>>.forwardInfo: ForwardInfo?

View File

@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.requests.abstracts.*
import dev.inmo.tgbotapi.requests.get.GetFile
import dev.inmo.tgbotapi.types.files.PathedFile
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
import dev.inmo.tgbotapi.types.message.content.MediaContent
import dev.inmo.tgbotapi.utils.*
suspend fun multipartFile(

Some files were not shown because too many files have changed in this diff Show More