FileRef

data class FileRef(val fileId: String, val uniqueId: String? = null, val sizeBytes: Long? = null)

A file Telegram holds, named the way Telegram names one.

telek does not download it — that is an effect, and effects are where a transport belongs. What a dispatcher gets is the identifier it needs to ask for the bytes later, without naming a transport type to do it.

fileId is only valid for the bot that received it and can change between messages; uniqueId is stable across both and is what to compare or store when the question is "is this the same file". Telegram documents that distinction and bots get it wrong in that direction, so both are carried rather than only the one a caller reaches for first.

Constructors

Link copied to clipboard
constructor(fileId: String, uniqueId: String? = null, sizeBytes: Long? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard