mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
add upload sticker file extensions
This commit is contained in:
parent
2399dc0d0a
commit
269a4dd707
@ -1,5 +1,6 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.stickers
|
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.MultipartFile
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartRequest
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartRequest
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
@ -27,3 +28,18 @@ data class UploadStickerFile(
|
|||||||
override val resultDeserializer: DeserializationStrategy<File>
|
override val resultDeserializer: DeserializationStrategy<File>
|
||||||
get() = File.serializer()
|
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)
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user