tgbotapi/TelegramBotAPI-extensions-api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/get/GetStickerSet.kt

18 lines
558 B
Kotlin

package dev.inmo.tgbotapi.extensions.api.get
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
import com.github.insanusmokrassar.TelegramBotAPI.requests.get.GetStickerSet
import com.github.insanusmokrassar.TelegramBotAPI.types.files.Sticker
suspend fun TelegramBot.getStickerSet(
name: String
) = execute(
GetStickerSet(name)
)
suspend fun TelegramBot.getStickerSet(
sticker: Sticker
) = getStickerSet(
sticker.stickerSetName ?: error("Sticker must contains stickerSetName to be correctly used in getStickerSet method")
)