[+] Implement function to get all open chats.

Close #14
This commit is contained in:
Pedro Lopez 2019-09-08 03:18:40 -04:00
commit cde0034d93

View file

@ -78,6 +78,9 @@ client.on('message', async msg => {
} else {
msg.reply('This command can only be used in a group!');
}
} else if(msg.body == '!chats') {
const chats = await client.getChats();
client.sendMessage(msg.from, `The bot has ${chats.length} chats open.`);
}
});