@@ -789,24 +789,41 @@ declare namespace TelegramBot {
789789 can_pin_messages ?: boolean | undefined ;
790790 }
791791
792- interface Sticker {
793- file_id : string ;
794- file_unique_id : string ;
792+ type StickerType = 'regular' | 'mask' | 'custom_emoji' ;
793+
794+ interface Sticker extends FileBase {
795+ type : StickerType ;
795796 is_animated : boolean ;
797+ is_video : boolean ;
796798 width : number ;
797799 height : number ;
798800 thumb ?: PhotoSize | undefined ;
799801 emoji ?: string | undefined ;
800802 set_name ?: string | undefined ;
803+ premium_animation ?: File | undefined ;
801804 mask_position ?: MaskPosition | undefined ;
802- file_size ?: number | undefined ;
805+ custom_emoji_id ?: string | undefined ;
803806 }
804807
805808 interface StickerSet {
806809 name : string ;
807810 title : string ;
808- contains_masks : boolean ;
811+ sticker_type : StickerType ;
812+ is_animated : boolean ;
813+ is_video : boolean ;
809814 stickers : Sticker [ ] ;
815+ thumb ?: PhotoSize | undefined ;
816+ }
817+
818+ interface CreateStickerSetOptions {
819+ tgs_sticker ?: string | Stream | Buffer ;
820+ webm_sticker ?: string | Stream | Buffer ;
821+ sticker_type ?: 'regular' | 'mask' ;
822+ mask_position ?: MaskPosition ;
823+ }
824+
825+ interface AddStickerToSetOptions {
826+ mask_position ?: MaskPosition ;
810827 }
811828
812829 interface MaskPosition {
@@ -1387,6 +1404,61 @@ declare class TelegramBot extends EventEmitter {
13871404 fileOptions ?: TelegramBot . FileOptions ,
13881405 ) : Promise < TelegramBot . Message > ;
13891406
1407+ getStickerSet (
1408+ name : string ,
1409+ options ?: { } ,
1410+ ) : Promise < TelegramBot . StickerSet > ;
1411+
1412+ getCustomEmojiStickers (
1413+ customEmojiIds : string [ ] ,
1414+ options ?: { } ,
1415+ ) : Promise < TelegramBot . Sticker [ ] > ;
1416+
1417+ uploadStickerFile (
1418+ userId : string ,
1419+ pngSticker : string | Stream | Buffer ,
1420+ options ?: { } ,
1421+ fileOptions ?: TelegramBot . FileOptions ,
1422+ ) : Promise < TelegramBot . File > ;
1423+
1424+ createNewStickerSet (
1425+ userId : string ,
1426+ name : string ,
1427+ title : string ,
1428+ pngSticker : string | Stream | Buffer ,
1429+ emojis : string ,
1430+ options ?: TelegramBot . CreateStickerSetOptions ,
1431+ fileOptions ?: TelegramBot . FileOptions ,
1432+ ) : Promise < boolean > ;
1433+
1434+ addStickerToSet (
1435+ userId : string ,
1436+ name : string ,
1437+ sticker : string | Stream | Buffer ,
1438+ emojis : string ,
1439+ stickerType : 'png_sticker' | 'tgs_sticker' | 'webm_sticker' ,
1440+ options ?: TelegramBot . AddStickerToSetOptions ,
1441+ fileOptions ?: TelegramBot . FileOptions ,
1442+ ) : Promise < boolean > ;
1443+
1444+ setStickerPositionInSet (
1445+ sticker : string ,
1446+ position : number ,
1447+ ) : Promise < boolean > ;
1448+
1449+ deleteStickerFromSet (
1450+ sticker : string ,
1451+ options ?: { } ,
1452+ ) : Promise < boolean > ;
1453+
1454+ setStickerSetThumb (
1455+ userId : string ,
1456+ name : string ,
1457+ pngThumb : string | Stream | Buffer ,
1458+ options ?: { } ,
1459+ fileOptions ?: TelegramBot . FileOptions ,
1460+ ) : Promise < boolean > ;
1461+
13901462 sendVideo (
13911463 chatId : TelegramBot . ChatId ,
13921464 video : string | Stream | Buffer ,
0 commit comments