1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-26 03:58:44 +00:00

add delete sticker from set

This commit is contained in:
InsanusMokrassar 2020-02-06 23:55:17 +06:00
parent 945dd05cfd
commit dfe5595fd3

View File

@ -1,7 +1,9 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.stickers
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.Sticker
import com.github.insanusmokrassar.TelegramBotAPI.types.stickerField
import kotlinx.serialization.*
import kotlinx.serialization.internal.BooleanSerializer
@ -17,3 +19,19 @@ data class DeleteStickerFromSet(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
suspend fun RequestsExecutor.deleteStickerFromSet(
sticker: FileId
) = execute(
DeleteStickerFromSet(
sticker
)
)
suspend fun RequestsExecutor.deleteStickerFromSet(
sticker: Sticker
) = deleteStickerFromSet(
sticker.fileId
)