1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 16:23:48 +00:00

add docs for InputFile

This commit is contained in:
InsanusMokrassar 2021-09-08 21:13:42 +06:00
parent 807952201b
commit ee81f49a75

View File

@ -10,6 +10,17 @@ import kotlinx.serialization.descriptors.*
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
/**
* Common type for all files in Telegram Bot API which can be sent via requests like [dev.inmo.tgbotapi.requests.send.media.SendDocument].
* You may use methods like [MPPFile.asMultipartFile] when you want to send files from your file system, but you should
* remember about [restrictions][https://core.telegram.org/bots/api#sending-files] in Telegram for bots. In case you
* wish to send file by its url, use [FileId] and pass your url as [FileId.fileId]
*
* @see MPPFile.asMultipartFile
* @see ByteArray.asMultipartFile
* @see ByteReadChannel.asMultipartFile
* @see ByteReadChannelAllocator.asMultipartFile
*/
@Serializable(InputFileSerializer::class)
sealed class InputFile {
abstract val fileId: String