@@ -101,6 +101,7 @@ declare module WAPI {
101101 const getStarredMessages : ( chatId : string ) => Promise < Message [ ] > ;
102102 const starMessage : ( messageId : string ) => Promise < boolean > ;
103103 const unstarMessage : ( messageId : string ) => Promise < boolean > ;
104+ const react : ( messageId : string , emoji : string ) => Promise < boolean > ;
104105 const getStickerDecryptable : ( mesasgeId : string ) => Message | boolean ;
105106 const forceStaleMediaUpdate : ( mesasgeId : string ) => Message | boolean ;
106107 const setMyName : ( newName : string ) => Promise < boolean > ;
@@ -2500,7 +2501,7 @@ public async contactUnblock(id: ContactId) : Promise<boolean> {
25002501 * @param messageId Message ID of the message you want to star
25012502 * @returns `true`
25022503 */
2503- public async starMessage ( messageId ?: ChatId ) : Promise < boolean > {
2504+ public async starMessage ( messageId : MessageId ) : Promise < boolean > {
25042505 return await this . pup (
25052506 messageId => WAPI . starMessage ( messageId ) ,
25062507 messageId
@@ -2512,13 +2513,26 @@ public async contactUnblock(id: ContactId) : Promise<boolean> {
25122513 * @param messageId Message ID of the message you want to unstar
25132514 * @returns `true`
25142515 */
2515- public async unstarMessage ( messageId ?: ChatId ) : Promise < boolean > {
2516+ public async unstarMessage ( messageId : MessageId ) : Promise < boolean > {
25162517 return await this . pup (
25172518 messageId => WAPI . unstarMessage ( messageId ) ,
25182519 messageId
25192520 ) as Promise < boolean > ;
25202521 }
25212522
2523+ /**
2524+ * React to a message
2525+ * @param messageId Message ID of the message you want to react to
2526+ * @param emoji 1 single emoji to add to the message as a reacion
2527+ * @returns boolean
2528+ */
2529+ public async react ( messageId : MessageId , emoji : string ) : Promise < boolean > {
2530+ return await this . pup (
2531+ ( { messageId, emoji} ) => WAPI . react ( messageId , emoji ) ,
2532+ { messageId, emoji}
2533+ ) as Promise < boolean > ;
2534+ }
2535+
25222536 /**
25232537 *
25242538 * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
0 commit comments