export function commonGuildCheck(bot: Client, ...users: User[]): Guild[] {
const guildList: Guild[] = bot.guilds.cache.map(g => g);
const newlist: Guild[] = guildList.filter(async g => {
(users.forEach(async u => {
return !!(g.members.cache.has(u.id) && await SetupHanlder.isMissingValues(g));
}));
});
console.log(`newlist2: ${newlist}`);
return newlist;
}
I don't get it, why does "newlist" giving me all the guilds. even when I debugged it, the return statement was false. I thought if something is false filter will continue.