Started migration to material-ui

This commit is contained in:
Cassio Santos
2020-06-09 20:50:16 -03:00
parent afaec2b3c6
commit d91c0c5155
28 changed files with 996 additions and 54 deletions

View File

@@ -32,8 +32,19 @@ module.exports = {
wbot.on("auth_failure", msg => {
console.error("AUTHENTICATION FAILURE", msg);
});
wbot.on("ready", () => {
wbot.on("ready", async () => {
console.log("READY");
// const chats = await wbot.getChats(); // pega as mensagens nao lidas (recebidas quando o bot estava offline)
// let unreadMessages; // todo > salvar isso no DB pra mostrar no frontend
// for (let chat of chats) {
// if (chat.unreadCount > 0) {
// unreadMessages = await chat.fetchMessages({
// limit: chat.unreadCount,
// });
// }
// }
// console.log(unreadMessages);
});
return wbot;