1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-05 08:09:21 +00:00

mask position is nullable in mask stickers and sticker sets

This commit is contained in:
2023-03-11 01:18:39 +06:00
parent 0c24aa1270
commit 3c4f8787a6
3 changed files with 17 additions and 14 deletions

View File

@@ -33,7 +33,10 @@ suspend fun TelegramBot.addStickerToSet(
emojis,
keywords
)
StickerType.Mask -> error("Unable to create Mask sticker to the set without maskPosition parameter")
StickerType.Mask -> InputSticker.Mask(
sticker,
emojis
)
StickerType.Regular -> InputSticker.WithKeywords.Regular(
sticker,
emojis,
@@ -48,7 +51,7 @@ suspend fun TelegramBot.addStickerToSet(
stickerSet: StickerSet,
sticker: InputFile,
emojis: List<String>,
maskPosition: MaskPosition
maskPosition: MaskPosition? = null
) = addStickerToSet(
userId,
stickerSet.name,
@@ -87,7 +90,7 @@ suspend fun TelegramBot.addStickerToSet(
stickerSet: StickerSet,
sticker: InputFile,
emojis: List<String>,
maskPosition: MaskPosition
maskPosition: MaskPosition? = null
) = addStickerToSet(
user.id, stickerSet, sticker, emojis, maskPosition
)