-
Notifications
You must be signed in to change notification settings - Fork 29
Description
i have installed package "message-web" and then create new node.js project and put this
const { default: MessagesClient } = require('messages-web')
const client = new MessagesClient()
client.on('qr-code', (base64Image) => {
// example code to save image
console.log("Fdsfds");
fs.writeFileSync('qr.jpg', base64Image.replace(/^data:image/png;base64,/, ""), { encoding: 'base64' })
// your code
})
client.on('authenticated', async (service) => {
const inbox = service.getInbox()
const credentials = await client.getCredentials()
fs.writeFileSync('credentials.json', JSON.stringify(credentials, null, '\t'))
await client.quit()
})
i have also created file "credentials.json" in root of project. and then if i run commaand "node message.js". as message.js is the file. nothing happend. can you please tell me where i get mistake?