Package dev.inmo.tgbotapi.types.files

Types

AnimationFile
Link copied to clipboard
common
data class AnimationFile(fileId: FileId, fileUniqueId: FileUniqueId, width: Int, height: Int, duration: Long?, thumb: PhotoSize?, fileName: String?, mimeType: MimeType?, fileSize: Long?) : TelegramMediaFile, MimedMediaFile, ThumbedMediaFile, PlayableMediaFile, CustomNamedMediaFile, SizedMediaFile
AudioFile
Link copied to clipboard
common
data class AudioFile(fileId: FileId, fileUniqueId: FileUniqueId, duration: Long?, performer: String?, title: String?, fileName: String?, mimeType: MimeType?, fileSize: Long?, thumb: PhotoSize?) : TelegramMediaFile, CustomNamedMediaFile, MimedMediaFile, ThumbedMediaFile, PlayableMediaFile, TitledMediaFile, Performerable
DocumentFile
Link copied to clipboard
common
data class DocumentFile(fileId: FileId, fileUniqueId: FileUniqueId, fileSize: Long?, thumb: PhotoSize?, mimeType: MimeType?, fileName: String?) : TelegramMediaFile, MimedMediaFile, ThumbedMediaFile, CustomNamedMediaFile
File
Link copied to clipboard
common
data class File(fileId: FileId, fileUniqueId: FileUniqueId, fileSize: Long?) : TelegramMediaFile
PathedFile
Link copied to clipboard
common
data class PathedFile(fileId: FileId, fileUniqueId: FileUniqueId, filePath: String, fileSize: Long?) : TelegramMediaFile
Photo
Link copied to clipboard
common
typealias Photo = List<PhotoSize>
PhotoSerializer
Link copied to clipboard
common
object PhotoSerializer : KSerializer<Photo>
PhotoSize
Link copied to clipboard
common
data class PhotoSize(fileId: FileId, fileUniqueId: FileUniqueId, fileSize: Long?, width: Int, height: Int) : SizedMediaFile
Sticker
Link copied to clipboard
common
data class Sticker(fileId: FileId, fileUniqueId: FileUniqueId, width: Int, height: Int, thumb: PhotoSize?, emoji: String?, stickerSetName: StickerSetName?, isAnimated: Boolean, maskPosition: MaskPosition?, fileSize: Long?) : TelegramMediaFile, SizedMediaFile, ThumbedMediaFile
VideoFile
Link copied to clipboard
common
data class VideoFile(fileId: FileId, fileUniqueId: FileUniqueId, width: Int, height: Int, duration: Long?, thumb: PhotoSize?, fileName: String?, mimeType: MimeType?, fileSize: Long?) : TelegramMediaFile, CustomNamedMediaFile, MimedMediaFile, ThumbedMediaFile, PlayableMediaFile, SizedMediaFile
VideoNoteFile
Link copied to clipboard
common
data class VideoNoteFile(fileId: FileId, fileUniqueId: FileUniqueId, width: Int, duration: Long?, thumb: PhotoSize?, fileSize: Long?) : TelegramMediaFile, ThumbedMediaFile, PlayableMediaFile, SizedMediaFile
VoiceFile
Link copied to clipboard
common
data class VoiceFile(fileId: FileId, fileUniqueId: FileUniqueId, duration: Long?, mimeType: MimeType?, fileSize: Long?) : TelegramMediaFile, MimedMediaFile, PlayableMediaFile

Functions

asAudioFile
Link copied to clipboard
common
fun VoiceFile.asAudioFile(performer: String? = null, title: String? = null, fileName: String? = null): AudioFile
asBytes
Link copied to clipboard
fun PathedFile.asBytes(telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper): ByteArray
asDocumentFile
Link copied to clipboard
common
inline fun TelegramMediaFile.asDocumentFile(): DocumentFile
asFile
Link copied to clipboard
fun PathedFile.asFile(telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper, dest: File = File.createTempFile(this.fileUniqueId, this.filename), defaultBufferSize: Int = DEFAULT_BUFFER_SIZE): File
asStream
Link copied to clipboard
fun PathedFile.asStream(telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper): InputStream
asVoiceFile
Link copied to clipboard
common
fun AudioFile.asVoiceFile(): VoiceFile
biggest
Link copied to clipboard
common
fun Photo.biggest(): PhotoSize?
fullUrl
Link copied to clipboard
common
fun PathedFile.fullUrl(keeper: TelegramAPIUrlsKeeper): String
resolveFileURL
Link copied to clipboard
common
fun TelegramAPIUrlsKeeper.resolveFileURL(file: PathedFile): String
toInputMediaVideo
Link copied to clipboard
common
inline fun VideoFile.toInputMediaVideo(textSources: TextSourcesList): InputMediaVideo
inline fun VideoFile.toInputMediaVideo(text: String? = null, parseMode: ParseMode? = null): InputMediaVideo

Properties

filename
Link copied to clipboard
common
val PathedFile.filename: FileName