File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,7 @@ declare module WAPI {
179
179
chatId : string
180
180
) => Promise < boolean > ;
181
181
const getBusinessProfilesProducts : ( to : string ) => Promise < any > ;
182
+ const editMessage : ( messageId : string , text : string ) => Promise < any > ;
182
183
const getCommunityInfo : ( groupId : string ) => Promise < any > ;
183
184
const getCommunityAdminIds : ( groupId : string ) => Promise < any > ;
184
185
const getCommunityAdmins : ( groupId : string ) => Promise < any > ;
@@ -1512,6 +1513,25 @@ public async testCallback(callbackToTest: SimpleListener, testData: any) : Prom
1512
1513
) as Promise < boolean | MessageId > ;
1513
1514
}
1514
1515
1516
+
1517
+ /**
1518
+ * NOTE: This is experimental, most accounts do not have access to this feature in their apps.
1519
+ *
1520
+ * Edit an existing message
1521
+ *
1522
+ * @param messageId The message ID to edit
1523
+ * @param text The new text content
1524
+ * @returns
1525
+ */
1526
+ public async editMessage ( messageId : MessageId , text : Content ) : Promise < boolean | MessageId > {
1527
+ return await this . pup (
1528
+ ( { messageId, text } ) => {
1529
+ return WAPI . editMessage ( messageId , text ) ;
1530
+ } ,
1531
+ { messageId, text }
1532
+ ) as Promise < boolean | MessageId > ;
1533
+ }
1534
+
1515
1535
/**
1516
1536
* [UNTESTED - REQUIRES FEEDBACK]
1517
1537
* Sends a payment request message to given chat
You can’t perform that action at this time.
0 commit comments