Package-level declarations

Types

Link copied to clipboard
@Serializable
interface AnimatedSticker : Sticker
Link copied to clipboard
@Serializable
data class AnimationFile(val fileId: FileId, val fileUniqueId: FileUniqueId, val width: Int, val height: Int, val duration: Long? = null, val thumb: PhotoSize? = null, val fileName: String? = null, val mimeType: MimeType? = null, val fileSize: Long? = null) : TelegramMediaFile, MimedMediaFile, ThumbedMediaFile, PlayableMediaFile, CustomNamedMediaFile, SizedMediaFile
Link copied to clipboard
@Serializable
data class AudioFile(val fileId: FileId, val fileUniqueId: FileUniqueId, val duration: Long? = null, val performer: String? = null, val title: String? = null, val fileName: String? = null, val mimeType: MimeType? = null, val fileSize: Long? = null, val thumb: PhotoSize? = null) : TelegramMediaFile, CustomNamedMediaFile, MimedMediaFile, ThumbedMediaFile, PlayableMediaFile, TitledMediaFile, Performerable
Link copied to clipboard
@Serializable
data class CustomEmojiAnimatedSticker(val fileId: FileId, val fileUniqueId: FileUniqueId, val width: Int, val height: Int, val customEmojiId: CustomEmojiId, val thumb: PhotoSize? = null, val emoji: String? = null, val stickerSetName: StickerSetName? = null, val fileSize: Long? = null) : CustomEmojiSticker, AnimatedSticker
Link copied to clipboard
@Serializable
data class CustomEmojiSimpleSticker(val fileId: FileId, val fileUniqueId: FileUniqueId, val width: Int, val height: Int, val customEmojiId: CustomEmojiId, val thumb: PhotoSize? = null, val emoji: String? = null, val stickerSetName: StickerSetName? = null, val fileSize: Long? = null) : CustomEmojiSticker
Link copied to clipboard
@Serializable
interface CustomEmojiSticker : Sticker
Link copied to clipboard
@Serializable
data class CustomEmojiVideoSticker(val fileId: FileId, val fileUniqueId: FileUniqueId, val width: Int, val height: Int, val customEmojiId: CustomEmojiId, val thumb: PhotoSize? = null, val emoji: String? = null, val stickerSetName: StickerSetName? = null, val fileSize: Long? = null) : CustomEmojiSticker, VideoSticker
Link copied to clipboard
Link copied to clipboard
@Serializable
data class DocumentFile(val fileId: FileId, val fileUniqueId: FileUniqueId, val fileSize: Long? = null, val thumb: PhotoSize? = null, val mimeType: MimeType? = null, val fileName: String? = null) : TelegramMediaFile, MimedMediaFile, ThumbedMediaFile, CustomNamedMediaFile
Link copied to clipboard
@Serializable
data class File(val fileId: FileId, val fileUniqueId: FileUniqueId, val fileSize: Long? = null) : TelegramMediaFile
Link copied to clipboard
@Serializable
data class MaskAnimatedSticker(val fileId: FileId, val fileUniqueId: FileUniqueId, val width: Int, val height: Int, val maskPosition: MaskPosition, val thumb: PhotoSize? = null, val emoji: String? = null, val stickerSetName: StickerSetName? = null, val fileSize: Long? = null) : MaskSticker, AnimatedSticker
Link copied to clipboard
@Serializable
data class MaskSimpleSticker(val fileId: FileId, val fileUniqueId: FileUniqueId, val width: Int, val height: Int, val maskPosition: MaskPosition, val thumb: PhotoSize? = null, val emoji: String? = null, val stickerSetName: StickerSetName? = null, val fileSize: Long? = null) : MaskSticker
Link copied to clipboard
@Serializable
interface MaskSticker : Sticker
Link copied to clipboard
@Serializable
data class MaskVideoSticker(val fileId: FileId, val fileUniqueId: FileUniqueId, val width: Int, val height: Int, val maskPosition: MaskPosition, val thumb: PhotoSize? = null, val emoji: String? = null, val stickerSetName: StickerSetName? = null, val fileSize: Long? = null) : MaskSticker, VideoSticker
Link copied to clipboard
Link copied to clipboard
@Serializable
data class PassportFile(val fileId: FileId, val fileUniqueId: FileUniqueId, val uploadingDate: TelegramDate, val fileSize: Long? = null) : TelegramMediaFile

This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.

Link copied to clipboard
@Serializable
data class PathedFile(val fileId: FileId, val fileUniqueId: FileUniqueId, val filePath: String, val fileSize: Long? = null) : TelegramMediaFile
Link copied to clipboard
typealias Photo = List<PhotoSize>
Link copied to clipboard
object PhotoSerializer : KSerializer<Photo>
Link copied to clipboard
@Serializable
data class PhotoSize(val fileId: FileId, val fileUniqueId: FileUniqueId, val fileSize: Long? = null, val width: Int, val height: Int) : SizedMediaFile
Link copied to clipboard
Link copied to clipboard
@Serializable
data class RegularAnimatedSticker(val fileId: FileId, val fileUniqueId: FileUniqueId, val width: Int, val height: Int, val thumb: PhotoSize? = null, val emoji: String? = null, val stickerSetName: StickerSetName? = null, val premiumAnimationFile: File?, val fileSize: Long? = null) : RegularSticker, AnimatedSticker
Link copied to clipboard
@Serializable
data class RegularSimpleSticker(val fileId: FileId, val fileUniqueId: FileUniqueId, val width: Int, val height: Int, val thumb: PhotoSize? = null, val emoji: String? = null, val stickerSetName: StickerSetName? = null, val premiumAnimationFile: File?, val fileSize: Long? = null) : RegularSticker
Link copied to clipboard
@Serializable
interface RegularSticker : Sticker
Link copied to clipboard
@Serializable
data class RegularVideoSticker(val fileId: FileId, val fileUniqueId: FileUniqueId, val width: Int, val height: Int, val thumb: PhotoSize? = null, val emoji: String? = null, val stickerSetName: StickerSetName? = null, val premiumAnimationFile: File?, val fileSize: Long? = null) : RegularSticker, VideoSticker
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
object StickerSerializer : KSerializer<Sticker>
Link copied to clipboard
@Serializable
data class StickerSurrogate(val file_id: FileId, val file_unique_id: FileUniqueId, val type: StickerType, val width: Int, val height: Int, val is_animated: Boolean? = null, val is_video: Boolean? = null, val thumb: PhotoSize? = null, val emoji: String? = null, val set_name: StickerSetName? = null, val premium_animation: File? = null, val mask_position: MaskPosition? = null, val custom_emoji_id: CustomEmojiId? = null, val file_size: Long? = null)
Link copied to clipboard

Declare common part of media files in Telegram. Note: it is not representation of JVM File type

Link copied to clipboard
Link copied to clipboard
interface TitledMediaFile
Link copied to clipboard
@Serializable
data class UnknownSticker(val fileId: FileId, val fileUniqueId: FileUniqueId, val width: Int, val height: Int, val thumb: PhotoSize? = null, val emoji: String? = null, val stickerSetName: StickerSetName? = null, val fileSize: Long? = null, val raw: JsonElement) : Sticker
Link copied to clipboard
@Serializable
data class VideoFile(val fileId: FileId, val fileUniqueId: FileUniqueId, val width: Int, val height: Int, val duration: Long? = null, val thumb: PhotoSize? = null, val fileName: String? = null, val mimeType: MimeType? = null, val fileSize: Long? = null) : TelegramMediaFile, CustomNamedMediaFile, MimedMediaFile, ThumbedMediaFile, PlayableMediaFile, SizedMediaFile
Link copied to clipboard
@Serializable
data class VideoNoteFile(val fileId: FileId, val fileUniqueId: FileUniqueId, val width: Int, val duration: Long? = null, val thumb: PhotoSize? = null, val fileSize: Long? = null) : TelegramMediaFile, ThumbedMediaFile, PlayableMediaFile, SizedMediaFile
Link copied to clipboard
@Serializable
interface VideoSticker : Sticker
Link copied to clipboard
@Serializable
data class VoiceFile(val fileId: FileId, val fileUniqueId: FileUniqueId, val duration: Long? = null, val mimeType: MimeType? = null, val fileSize: Long? = null) : TelegramMediaFile, MimedMediaFile, PlayableMediaFile

Functions

Link copied to clipboard
fun VoiceFile.asAudioFile(performer: String? = null, title: String? = null, fileName: String? = null): AudioFile
Link copied to clipboard
Link copied to clipboard
fun PathedFile.asStream(telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper): InputStream
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard