puppet-padlocal
puppet-padlocal copied to clipboard
Rooms left before are still on the list.
bot.on('ready', async () => {
const rooms = await bot.Room.findAll();
for (const room of rooms) {
log.info('Room', room);
const members = await room.memberAll();
log.info('Members', members);
}
});
there are 6 groups returned in Room.findAll, however, 4 of them are already disbanded.
How to delete them from the findAll result or how to get real rooms which exists?
Interesting, my result is exactly on the contrary -- I got way few rooms than I'm in, from the bot.Room.findAll() output.
I think what happened might be, it remembers and logs all the rooms it had received message before, since login.
Are you doing such ... Ah, no, you're doing it at bot.on('ready'. Hmm, bot on ready should be before on login, right?