open-wa/wa-automate-nodejs
The issue has been closed
FEATURE: SetProfilePic didnt work?? #1105
Terror-Machine posted onGitHub
<!-- READ THIS FIRST: - Make sure you are running the latest version of @open-wa/wa-automate before reporting an issue. - Provide as many details as possible. Paste logs, configuration samples and code into the backticks. DO NOT DELETE ANY TEXT from this template! Otherwise, your issue may be closed without comment. -->
Describe the bug i try to reproduce to update profile pictures with commands bot, but didnt work. its still insider or how to use that?
create() code
} else if (getComs(txt, 'setprofilepic')) {
if (isMedia) {
const mediaData = await decryptMedia(message)
const imageBase64 = `data:${mimetype};base64,${mediaData.toString('base64')}`
await fn.setProfilePic(imageBase64)
} else if (quotedMsg && quotedMsg.type == 'image') {
const mediaData = await decryptMedia(quotedMsg)
const imageBase64 = `data:${quotedMsg.mimetype};base64,${mediaData.toString('base64')}`
await fn.setProfilePic(imageBase64)
}
}
DEBUG INFO This is the info printed to the console when you start your app. It should look like this
Debug Info {
WA_VERSION: 2.2047.11,
PAGE_UA: WhatsApp/2.2037.6 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36,
WA_AUTOMATE_VERSION: 3.1.0,
BROWSER_VERSION: HeadlessChrome/87.0.4280.66
}
Host (please complete the following information):
- OS: Android