mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-17 19:26:20 +00:00
@@ -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.`);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user