mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
fix: guild selector not filtering guilds (closes #408)
This commit is contained in:
parent
fa921fa5a6
commit
739efdcc3a
@ -2,14 +2,11 @@ const { PermissionsBitField } = require('discord.js');
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {import("client")} client
|
||||
* @param {import("discord.js").Client} client
|
||||
* @param {string} userId
|
||||
* @returns {Promise<Collection<import("discord.js").Guild>}
|
||||
*/
|
||||
module.exports.getCommonGuilds = async (client, userId) => await client.guilds.cache.filter(async guild => {
|
||||
const member = await guild.members.fetch(userId);
|
||||
return !!member;
|
||||
});
|
||||
module.exports.getCommonGuilds = (client, userId) => client.guilds.cache.filter(guild => guild.members.cache.has(userId));
|
||||
|
||||
/**
|
||||
* @param {import("discord.js").Guild} guild
|
||||
|
Loading…
Reference in New Issue
Block a user