All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.dev.inmo.tgbotapi.extensions.api.get.GetCustomEmojiStickers.kt Maven / Gradle / Ivy

Go to download

API extensions with "Telegram Bot API"-like extensions for TelegramBot and RequestsExecutor

There is a newer version: 20.0.1
Show newest version
package dev.inmo.tgbotapi.extensions.api.get

import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.get.GetCustomEmojiStickers
import dev.inmo.tgbotapi.requests.get.GetStickerSet
import dev.inmo.tgbotapi.types.CustomEmojiId
import dev.inmo.tgbotapi.types.files.CustomEmojiSticker
import dev.inmo.tgbotapi.types.files.Sticker
import kotlin.js.JsName
import kotlin.jvm.JvmName

public suspend fun TelegramBot.getCustomEmojiStickers(
    customEmojiIds: List
): List = execute(
    GetCustomEmojiStickers(customEmojiIds)
)

@JvmName("getCustomEmojiStickersWithStringsList")
@JsName("getCustomEmojiStickersWithStringsList")
public suspend fun TelegramBot.getCustomEmojiStickers(
    customEmojiIds: List
): List = getCustomEmojiStickers(customEmojiIds.map(::CustomEmojiId))

public suspend fun TelegramBot.getCustomEmojiStickerOrNull(
    customEmojiId: CustomEmojiId
): CustomEmojiSticker? = getCustomEmojiStickers(listOf(customEmojiId)).firstOrNull()

public suspend fun TelegramBot.getCustomEmojiStickerOrThrow(
    customEmojiId: CustomEmojiId
): CustomEmojiSticker = getCustomEmojiStickers(listOf(customEmojiId)).first()

public suspend fun TelegramBot.getCustomEmojiStickerOrNull(
    customEmojiId: String
): CustomEmojiSticker? = getCustomEmojiStickerOrNull(CustomEmojiId(customEmojiId))

public suspend fun TelegramBot.getCustomEmojiStickerOrThrow(
    customEmojiId: String
): CustomEmojiSticker = getCustomEmojiStickerOrThrow(CustomEmojiId(customEmojiId))




© 2015 - 2024 Weber Informatics LLC | Privacy Policy