@areumtecnologia/baileys 1.0.2 → 1.0.3
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/handlers/messages.js +4 -3
- package/package.json +1 -1
package/handlers/messages.js
CHANGED
|
@@ -99,11 +99,12 @@ class MessageHandler {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
/** Envia um documento. */
|
|
102
|
-
async sendDocument(jid, media, mimetype, fileName = '
|
|
102
|
+
async sendDocument(jid, media, mimetype, fileName = '', caption = '', options = {}) {
|
|
103
103
|
const content = {
|
|
104
104
|
document: typeof media === 'string' ? { url: media } : media,
|
|
105
105
|
mimetype,
|
|
106
|
-
fileName
|
|
106
|
+
fileName,
|
|
107
|
+
caption
|
|
107
108
|
};
|
|
108
109
|
return this.sendMessage(jid, content, options);
|
|
109
110
|
}
|
|
@@ -341,7 +342,7 @@ class MessageHandler {
|
|
|
341
342
|
};
|
|
342
343
|
|
|
343
344
|
return {
|
|
344
|
-
|
|
345
|
+
mimetype,
|
|
345
346
|
extension,
|
|
346
347
|
buffer,
|
|
347
348
|
|