1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-03 00:15:27 +00:00
tgbotapi/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMediaPhoto.kt

41 lines
1.5 KiB
Kotlin
Raw Normal View History

2020-10-04 11:06:30 +00:00
package dev.inmo.tgbotapi.types.InputMedia
2018-12-26 08:07:24 +00:00
2020-11-05 18:12:14 +00:00
import dev.inmo.tgbotapi.requests.abstracts.InputFile
2022-05-01 14:36:07 +00:00
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
2022-05-01 14:43:03 +00:00
import dev.inmo.tgbotapi.types.message.ParseMode
2020-10-04 11:06:30 +00:00
import dev.inmo.tgbotapi.types.files.PhotoSize
import dev.inmo.tgbotapi.types.media.TelegramMediaPhoto
2021-08-08 12:00:42 +00:00
import dev.inmo.tgbotapi.utils.extensions.makeString
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaPhoto", "dev.inmo.tgbotapi.types.media.TelegramMediaPhoto"))
fun InputMediaPhoto(
file: InputFile,
text: String? = null,
parseMode: ParseMode? = null
) = TelegramMediaPhoto(file, text, parseMode, null)
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaPhoto", "dev.inmo.tgbotapi.types.media.TelegramMediaPhoto"))
fun InputMediaPhoto(
file: InputFile,
2021-05-29 09:34:14 +00:00
entities: TextSourcesList
) = TelegramMediaPhoto(file, entities.makeString(), null, entities.toRawMessageEntities())
2018-12-26 08:07:24 +00:00
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaPhoto", "dev.inmo.tgbotapi.types.media.TelegramMediaPhoto"))
2018-12-26 08:07:24 +00:00
fun PhotoSize.toInputMediaPhoto(
2021-04-26 15:25:52 +00:00
text: String? = null,
2018-12-26 08:07:24 +00:00
parseMode: ParseMode? = null
): InputMediaPhoto = TelegramMediaPhoto(
2018-12-26 08:07:24 +00:00
fileId,
text,
2018-12-26 08:07:24 +00:00
parseMode
)
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaPhoto", "dev.inmo.tgbotapi.types.media.TelegramMediaPhoto"))
fun PhotoSize.toInputMediaPhoto(
textSources: TextSourcesList = emptyList()
): InputMediaPhoto = TelegramMediaPhoto(
fileId,
textSources
)