mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-20 20:49:15 +00:00
feat(provider): 🚀 fix provider
This commit is contained in:
@@ -163,7 +163,7 @@ class WebWhatsappProvider extends ProviderClass {
|
|||||||
* @param {*} text
|
* @param {*} text
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
sendImage = async (number, filePath, text) => {
|
sendImage = async (number, filePath) => {
|
||||||
const base64 = readFileSync(filePath, { encoding: 'base64' })
|
const base64 = readFileSync(filePath, { encoding: 'base64' })
|
||||||
const mimeType = mime.lookup(filePath)
|
const mimeType = mime.lookup(filePath)
|
||||||
const media = new MessageMedia(mimeType, base64)
|
const media = new MessageMedia(mimeType, base64)
|
||||||
@@ -180,7 +180,7 @@ class WebWhatsappProvider extends ProviderClass {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sendAudio = async (number, filePath, text) => {
|
sendAudio = async (number, filePath) => {
|
||||||
const base64 = readFileSync(filePath, { encoding: 'base64' })
|
const base64 = readFileSync(filePath, { encoding: 'base64' })
|
||||||
const mimeType = mime.lookup(filePath)
|
const mimeType = mime.lookup(filePath)
|
||||||
const media = new MessageMedia(mimeType, base64)
|
const media = new MessageMedia(mimeType, base64)
|
||||||
|
|||||||
Reference in New Issue
Block a user