Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* official contacts list
*/
for (let i = 0; i < contactList.length; i++) {
const contact = contactList[i]
if (contact.type() === Contact.Type.Official) {
log.info('Bot', `official ${i}: ${contact}`)
}
}
/**
* personal contact list
*/
for (let i = 0; i < contactList.length; i++) {
const contact = contactList[i]
if (contact.type() === Contact.Type.Personal) {
log.info('Bot', `personal ${i}: ${contact.name()} : ${contact.id}`)
}
}
const MAX = 17
for (let i = 0; i < contactList.length; i++ ) {
const contact = contactList[i]
/**
* Save avatar to file like: "1-name.jpg"
*/
const file = await contact.avatar()
const name = file.name
await file.toFile(name, true)
log.info('Bot', 'Contact: "%s" with avatar file: "%s"',