sulla
sulla copied to clipboard
Is sendImageAsSticker working?
I followed the README and called await client.sendImageAsSticker(chatId, pathToImage); but it didn't work, also didn't throw any error
Please add also the code used to send it along with the chatid and the pathtoimage
The text message is sent but the sticker is not, the pathtoimage is also correct
import * as sulla from 'sulla'
sulla.create().then(client => start(client))
function start (client: sulla.Whatsapp) {
client.onMessage(async message => {
if (message.body === 'Hi') {
await client.sendText(message.from, '👋 Hello')
await client.sendImageAsSticker(message.from,'./assets/image.jpg')
}
})
}
Just to be sure, could you use sendFile instead of sendImageAsSticker? Just to see if that works. Also try to start sulla by setting headless to false and devtools to true and check if there is any error on dev console of the browser windows that opens
Daniel - Software Engineer
Support me at: Github sponsors
On 20 Apr 2020, at 18:52, Renato Macêdo [email protected] wrote:
The text message is sent but the sticker is not, the pathtoimage is also correct
`import * as sulla from 'sulla'
sulla.create().then(client => start(client))
function start (client: sulla.Whatsapp) { client.onMessage(async message => { if (message.body === 'Hi') {
await client.sendText(message.from, '👋 Hello') await client.sendImageAsSticker(message.from,'./assets/image.jpg') } }) }`
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
sendFile worked, but still there is nothing on the console of the browser window
For me sendassticker is working.
Are you using a PNG? size 512 x 512 works for me
UnhandledPromiseRejectionWarning: Error: Input buffer contains unsupported image format
Getting this after trying to sendImageAsSticker() executed.