mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
add several extensions for addStickerToSet
This commit is contained in:
parent
810b2ab5a1
commit
6722ab5f50
@ -18,6 +18,16 @@ suspend fun TelegramBot.addStickerToSet(
|
||||
AddStickerToSet(userId, stickerSetName, inputSticker)
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.addStickerToSet(
|
||||
userId: UserId,
|
||||
stickerSet: StickerSet,
|
||||
sticker: InputSticker
|
||||
) = addStickerToSet(
|
||||
userId,
|
||||
stickerSet.name,
|
||||
sticker
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.addStickerToSet(
|
||||
userId: UserId,
|
||||
stickerSet: StickerSet,
|
||||
@ -26,7 +36,7 @@ suspend fun TelegramBot.addStickerToSet(
|
||||
keywords: List<String> = emptyList()
|
||||
) = addStickerToSet(
|
||||
userId,
|
||||
stickerSet.name,
|
||||
stickerSet,
|
||||
when (stickerSet.stickerType) {
|
||||
StickerType.CustomEmoji -> InputSticker.WithKeywords.CustomEmoji(
|
||||
sticker,
|
||||
@ -75,6 +85,16 @@ suspend fun TelegramBot.addStickerToSet(
|
||||
}
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.addStickerToSet(
|
||||
user: CommonUser,
|
||||
stickerSet: StickerSet,
|
||||
sticker: InputSticker
|
||||
) = addStickerToSet(
|
||||
user.id,
|
||||
stickerSet.name,
|
||||
sticker
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.addStickerToSet(
|
||||
user: CommonUser,
|
||||
stickerSet: StickerSet,
|
||||
|
Loading…
Reference in New Issue
Block a user