Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
2. '#busy I'm busy' - set busy mode ON and set a Auto Reply Message
3. '#free' - set busy mode OFF
4. '#status' - check the current Busy Mode and Auto Reply Message.
Loading... please wait for QrCode Image Url and then scan to login.
`)
let bot
const token = config.token
if (token) {
log.info('Wechaty', 'TOKEN: %s', token)
bot = Wechaty.instance({ profile: token })
const ioClient = new IoClient({
token,
wechaty: bot,
})
ioClient.start().catch(e => {
log.error('Wechaty', 'IoClient.init() exception: %s', e)
bot.emit('error', e)
})
} else {
log.verbose('Wechaty', 'TOKEN: N/A')
bot = Wechaty.instance()
}
bot
.on('scan', (qrcode, status) => {
qrTerm.generate(qrcode, { small: true })