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

add upload sticker file extensions

This commit is contained in:
InsanusMokrassar 2020-02-06 23:39:57 +06:00
parent 2399dc0d0a
commit 269a4dd707

View File

@ -1,5 +1,6 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.stickers
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.*
@ -27,3 +28,18 @@ data class UploadStickerFile(
override val resultDeserializer: DeserializationStrategy<File>
get() = File.serializer()
}
suspend fun RequestsExecutor.uploadStickerFile(
userId: UserId,
sticker: MultipartFile
) = execute(
UploadStickerFile(userId, sticker)
)
suspend fun RequestsExecutor.uploadStickerFile(
user: CommonUser,
sticker: MultipartFile
) = execute(
UploadStickerFile(user.id, sticker)
)