mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
add get file info extensions
This commit is contained in:
parent
be4043f3c2
commit
86f1e3ea36
@ -1,8 +1,10 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.get
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.TelegramMediaFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.fileIdField
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@ -17,3 +19,13 @@ data class GetFile(
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
||||
|
||||
suspend fun RequestsExecutor.getFileAdditionalInfo(
|
||||
fileId: FileId
|
||||
) = execute(
|
||||
GetFile(fileId)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.getFileAdditionalInfo(
|
||||
file: TelegramMediaFile
|
||||
) = getFileAdditionalInfo(file.fileId)
|
||||
|
Loading…
Reference in New Issue
Block a user