mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-03-03 17:32:23 +00:00
add support of profile audios
This commit is contained in:
@@ -227,6 +227,7 @@ import dev.inmo.tgbotapi.types.files.UnknownSticker
|
||||
import dev.inmo.tgbotapi.types.files.UsefulAsPaidMediaFile
|
||||
import dev.inmo.tgbotapi.types.files.VideoFile
|
||||
import dev.inmo.tgbotapi.types.files.VideoNoteFile
|
||||
import dev.inmo.tgbotapi.types.files.VideoQuality
|
||||
import dev.inmo.tgbotapi.types.files.VideoSticker
|
||||
import dev.inmo.tgbotapi.types.files.VoiceFile
|
||||
import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived
|
||||
@@ -1868,6 +1869,12 @@ public inline fun TelegramMediaFile.pathedFileOrThrow(): PathedFile = this as de
|
||||
|
||||
public inline fun <T> TelegramMediaFile.ifPathedFile(block: (PathedFile) -> T): T? = pathedFileOrNull() ?.let(block)
|
||||
|
||||
public inline fun TelegramMediaFile.videoQualityOrNull(): VideoQuality? = this as? dev.inmo.tgbotapi.types.files.VideoQuality
|
||||
|
||||
public inline fun TelegramMediaFile.videoQualityOrThrow(): VideoQuality = this as dev.inmo.tgbotapi.types.files.VideoQuality
|
||||
|
||||
public inline fun <T> TelegramMediaFile.ifVideoQuality(block: (VideoQuality) -> T): T? = videoQualityOrNull() ?.let(block)
|
||||
|
||||
public inline fun TelegramMediaFile.passportFileOrNull(): PassportFile? = this as? dev.inmo.tgbotapi.types.files.PassportFile
|
||||
|
||||
public inline fun TelegramMediaFile.passportFileOrThrow(): PassportFile = this as dev.inmo.tgbotapi.types.files.PassportFile
|
||||
|
||||
@@ -18,7 +18,7 @@ inline val Sticker.set_name: StickerSetName?
|
||||
get() = stickerSetName
|
||||
inline val Sticker.mask_position: MaskPosition?
|
||||
get() = maskStickerOrNull() ?.maskPosition
|
||||
inline val Sticker.file_size: Long?
|
||||
inline val Sticker.file_size: FileSize?
|
||||
get() = fileSize
|
||||
inline val Sticker.premium_animation: File?
|
||||
get() = regularStickerOrNull() ?.premiumAnimationFile
|
||||
|
||||
Reference in New Issue
Block a user