@open-wa/wa-automate 4.49.0 → 4.49.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/Client.d.ts +9 -1
- package/dist/api/Client.js +15 -1
- package/package.json +1 -1
package/dist/api/Client.d.ts
CHANGED
@@ -208,7 +208,8 @@ export declare class Client {
|
|
208
208
|
*/
|
209
209
|
onPlugged(fn: (plugged: boolean) => void): Promise<Listener | boolean>;
|
210
210
|
/**
|
211
|
-
*
|
211
|
+
* {@license:restricted@}
|
212
|
+
*
|
212
213
|
* Listens to when a contact posts a new story.
|
213
214
|
* @event
|
214
215
|
*
|
@@ -736,6 +737,13 @@ export declare class Client {
|
|
736
737
|
* @param quotedMsgId string true_0000000000@c.us_JHB2HB23HJ4B234HJB to send as a reply to a message
|
737
738
|
*/
|
738
739
|
sendAudio(to: ChatId, file: AdvancedFile, quotedMsgId?: MessageId): Promise<MessageId>;
|
740
|
+
/**
|
741
|
+
* Send a poll to a group chat
|
742
|
+
* @param to chat id - a group chat is required
|
743
|
+
* @param name the name of the poll
|
744
|
+
* @param options an array of poll options
|
745
|
+
*/
|
746
|
+
sendPoll(to: GroupChatId, name: string, options: string[]): Promise<MessageId>;
|
739
747
|
/**
|
740
748
|
* Sends a video to given chat as a gif, with caption or not, using base64
|
741
749
|
* @param to chat id `xxxxx@c.us`
|
package/dist/api/Client.js
CHANGED
@@ -856,7 +856,8 @@ class Client {
|
|
856
856
|
});
|
857
857
|
}
|
858
858
|
/**
|
859
|
-
*
|
859
|
+
* {@license:restricted@}
|
860
|
+
*
|
860
861
|
* Listens to when a contact posts a new story.
|
861
862
|
* @event
|
862
863
|
*
|
@@ -1817,6 +1818,19 @@ class Client {
|
|
1817
1818
|
return this.sendFile(to, file, 'file.mp3', '', quotedMsgId, true, false, false, false);
|
1818
1819
|
});
|
1819
1820
|
}
|
1821
|
+
/**
|
1822
|
+
* Send a poll to a group chat
|
1823
|
+
* @param to chat id - a group chat is required
|
1824
|
+
* @param name the name of the poll
|
1825
|
+
* @param options an array of poll options
|
1826
|
+
*/
|
1827
|
+
sendPoll(to, name, options) {
|
1828
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1829
|
+
return yield this.pup(({ to, name, options }) => {
|
1830
|
+
return WAPI.sendPoll(to, name, options);
|
1831
|
+
}, { to, name, options });
|
1832
|
+
});
|
1833
|
+
}
|
1820
1834
|
/**
|
1821
1835
|
* Sends a video to given chat as a gif, with caption or not, using base64
|
1822
1836
|
* @param to chat id `xxxxx@c.us`
|
package/package.json
CHANGED