Package dev.inmo.tgbotapi.types.files

Types

Link copied to clipboard
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
Link copied to clipboard
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
Link copied to clipboard
data class DocumentFile(fileId: FileId, fileUniqueId: FileUniqueId, fileSize: Long?, thumb: PhotoSize?, mimeType: MimeType?, fileName: String?) : TelegramMediaFile, MimedMediaFile, ThumbedMediaFile, CustomNamedMediaFile
Link copied to clipboard
data class File(fileId: FileId, fileUniqueId: FileUniqueId, fileSize: Long?) : TelegramMediaFile
Link copied to clipboard
data class PathedFile(fileId: FileId, fileUniqueId: FileUniqueId, filePath: String, fileSize: Long?) : TelegramMediaFile
Link copied to clipboard
typealias Photo = List<PhotoSize>
Link copied to clipboard
object PhotoSerializer : KSerializer<Photo>
Link copied to clipboard
data class PhotoSize(fileId: FileId, fileUniqueId: FileUniqueId, fileSize: Long?, width: Int, height: Int) : SizedMediaFile
Link copied to clipboard
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
Link copied to clipboard
data class VideoNoteFile(fileId: FileId, fileUniqueId: FileUniqueId, width: Int, duration: Long?, thumb: PhotoSize?, fileSize: Long?) : TelegramMediaFile, ThumbedMediaFile, PlayableMediaFile, SizedMediaFile
Link copied to clipboard
data class VoiceFile(fileId: FileId, fileUniqueId: FileUniqueId, duration: Long?, mimeType: MimeType?, fileSize: Long?) : 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
inline fun TelegramMediaFile.asDocumentFile(): DocumentFile
Link copied to clipboard
fun PathedFile.asStream(telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper): InputStream
Link copied to clipboard
fun AudioFile.asVoiceFile(): VoiceFile
Link copied to clipboard
fun Photo.biggest(): PhotoSize?
Link copied to clipboard
fun PathedFile.fullUrl(keeper: TelegramAPIUrlsKeeper): String
Link copied to clipboard
fun TelegramAPIUrlsKeeper.resolveFileURL(file: PathedFile): String
Link copied to clipboard
inline fun VideoFile.toInputMediaVideo(textSources: TextSourcesList): InputMediaVideo
inline fun VideoFile.toInputMediaVideo(text: String? = null, parseMode: ParseMode? = null): InputMediaVideo