mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-03 15:19:30 +00:00
progress on addinf of paid media
This commit is contained in:
@@ -193,7 +193,7 @@ import dev.inmo.tgbotapi.types.files.MediaContentVariant
|
||||
import dev.inmo.tgbotapi.types.files.MimedMediaFile
|
||||
import dev.inmo.tgbotapi.types.files.PassportFile
|
||||
import dev.inmo.tgbotapi.types.files.PathedFile
|
||||
import dev.inmo.tgbotapi.types.files.Photo
|
||||
import dev.inmo.tgbotapi.types.files.PhotoFile
|
||||
import dev.inmo.tgbotapi.types.files.PhotoSize
|
||||
import dev.inmo.tgbotapi.types.files.PlayableMediaFile
|
||||
import dev.inmo.tgbotapi.types.files.RegularAnimatedSticker
|
||||
@@ -2707,13 +2707,13 @@ public inline fun TelegramMediaFile.pathedFileOrThrow(): PathedFile = this as
|
||||
public inline fun <T> TelegramMediaFile.ifPathedFile(block: (PathedFile) -> T): T? =
|
||||
pathedFileOrNull() ?.let(block)
|
||||
|
||||
public inline fun TelegramMediaFile.photoOrNull(): Photo? = this as?
|
||||
dev.inmo.tgbotapi.types.files.Photo
|
||||
public inline fun TelegramMediaFile.photoOrNull(): PhotoFile? = this as?
|
||||
dev.inmo.tgbotapi.types.files.PhotoFile
|
||||
|
||||
public inline fun TelegramMediaFile.photoOrThrow(): Photo = this as
|
||||
dev.inmo.tgbotapi.types.files.Photo
|
||||
public inline fun TelegramMediaFile.photoOrThrow(): PhotoFile = this as
|
||||
dev.inmo.tgbotapi.types.files.PhotoFile
|
||||
|
||||
public inline fun <T> TelegramMediaFile.ifPhoto(block: (Photo) -> T): T? = photoOrNull()
|
||||
public inline fun <T> TelegramMediaFile.ifPhoto(block: (PhotoFile) -> T): T? = photoOrNull()
|
||||
?.let(block)
|
||||
|
||||
public inline fun TelegramMediaFile.photoSizeOrNull(): PhotoSize? = this as?
|
||||
|
@@ -103,7 +103,7 @@ inline val Message.animation: AnimationFile?
|
||||
inline val Message.game: Game?
|
||||
get() = asContentMessage() ?.content ?.asGameContent() ?.game
|
||||
@RiskFeature(RawFieldsUsageWarning)
|
||||
inline val Message.photo: Photo?
|
||||
inline val Message.photo: PhotoFile?
|
||||
get() = asContentMessage() ?.content ?.asPhotoContent() ?.mediaCollection
|
||||
@RiskFeature(RawFieldsUsageWarning)
|
||||
inline val Message.sticker: Sticker?
|
||||
@@ -145,7 +145,7 @@ inline val Message.left_chat_member: User?
|
||||
inline val Message.new_chat_title: String?
|
||||
get() = asChatEventMessage() ?.chatEvent ?.asNewChatTitle() ?.title
|
||||
@RiskFeature(RawFieldsUsageWarning)
|
||||
inline val Message.new_chat_photo: Photo?
|
||||
inline val Message.new_chat_photo: PhotoFile?
|
||||
get() = asChatEventMessage() ?.chatEvent ?.asNewChatPhoto() ?.photo
|
||||
@RiskFeature(RawFieldsUsageWarning)
|
||||
inline val Message.delete_chat_photo: Boolean
|
||||
|
Reference in New Issue
Block a user