@@ -299,6 +299,9 @@ declare module WAPI {
299299 includeMe : boolean ,
300300 includeNotifications : boolean ,
301301 ) => [ Message ]
302+ const favSticker : ( msgId : string , fav : boolean ) => string
303+ const sendFavSticker : ( chatId : string , favId : string ) => string
304+ const getFavStickers : ( ) => any [ ]
302305}
303306/* eslint-enable */
304307
@@ -3441,6 +3444,40 @@ public async getStatus(contactId: ContactId) : Promise<{
34413444 }
34423445
34433446
3447+ /**
3448+ * Set/Unset a sticker as a fav.
3449+ * @param msgId The message Id related to the sticker you want to fav
3450+ * @param fav set this to true to fav a sticker, set it to false to remove the sticker from favorites. default true
3451+ * @returns favId The ID (filehash) of the fav sticker
3452+ */
3453+ public async favSticker ( msgId : MessageId , fav = true ) : Promise < string > {
3454+ return await this . pup (
3455+ ( { msgId, fav} ) => WAPI . favSticker ( msgId , fav ) ,
3456+ { msgId, fav}
3457+ ) ;
3458+ }
3459+
3460+
3461+ /**
3462+ * Set/Unset a sticker as a fav.
3463+ * @param chatId The chat in which you want to send the sticker
3464+ * @param favId set this to true to favourite a sticker, set it to false to remove the sticker from favorites
3465+ * @returns MessageId of the sent sticker message
3466+ */
3467+ public async sendFavSticker ( chatId : ChatId , favId : string ) : Promise < MessageId > {
3468+ return await this . pup (
3469+ ( { chatId, favId} ) => WAPI . sendFavSticker ( chatId , favId ) ,
3470+ { chatId, favId}
3471+ ) ;
3472+ }
3473+
3474+ /**
3475+ * Get an array of fav'ed stickers
3476+ */
3477+ public async getFavStickers ( ) : Promise < Partial < Message > > {
3478+ return await this . pup ( ( ) => WAPI . getFavStickers ( ) )
3479+ }
3480+
34443481 /**
34453482 * Revokes the current invite link for a group chat. Any previous links will stop working
34463483 * @param chatId
0 commit comments