@open-wa/wa-automate 4.49.1 → 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.
@@ -737,6 +737,13 @@ export declare class Client {
737
737
  * @param quotedMsgId string true_0000000000@c.us_JHB2HB23HJ4B234HJB to send as a reply to a message
738
738
  */
739
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>;
740
747
  /**
741
748
  * Sends a video to given chat as a gif, with caption or not, using base64
742
749
  * @param to chat id `xxxxx@c.us`
@@ -1818,6 +1818,19 @@ class Client {
1818
1818
  return this.sendFile(to, file, 'file.mp3', '', quotedMsgId, true, false, false, false);
1819
1819
  });
1820
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
+ }
1821
1834
  /**
1822
1835
  * Sends a video to given chat as a gif, with caption or not, using base64
1823
1836
  * @param to chat id `xxxxx@c.us`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.49.1",
3
+ "version": "4.49.2",
4
4
  "licenseCheckUrl": "https://funcs.openwa.dev/license-check",
5
5
  "brokenMethodReportUrl": "https://funcs.openwa.dev/report-bm",
6
6
  "patches": "https://cdn.openwa.dev/patches.json",