2020-10-04 10:57:39 +00:00
|
|
|
package dev.inmo.tgbotapi.extensions.api.get
|
2020-02-15 09:33:04 +00:00
|
|
|
|
2020-10-04 11:06:30 +00:00
|
|
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
|
|
|
import dev.inmo.tgbotapi.requests.get.GetStickerSet
|
|
|
|
import dev.inmo.tgbotapi.types.files.Sticker
|
2020-02-15 09:33:04 +00:00
|
|
|
|
2020-10-04 07:18:24 +00:00
|
|
|
suspend fun TelegramBot.getStickerSet(
|
2020-02-15 09:33:04 +00:00
|
|
|
name: String
|
|
|
|
) = execute(
|
|
|
|
GetStickerSet(name)
|
|
|
|
)
|
|
|
|
|
2020-10-04 07:18:24 +00:00
|
|
|
suspend fun TelegramBot.getStickerSet(
|
2020-02-15 09:33:04 +00:00
|
|
|
sticker: Sticker
|
|
|
|
) = getStickerSet(
|
|
|
|
sticker.stickerSetName ?: error("Sticker must contains stickerSetName to be correctly used in getStickerSet method")
|
|
|
|
)
|