|
@@ -31,7 +31,9 @@ async function checkUser(action: string, userId: string, check: (user: GuildMemb
|
|
}
|
|
}
|
|
const user = await tryDo(guildInstance.result.members.fetch(userId));
|
|
const user = await tryDo(guildInstance.result.members.fetch(userId));
|
|
if (!user.ok) {
|
|
if (!user.ok) {
|
|
- logger.warn("Couldn't %s for user %s on server %s because: %s", action, userId, guild.guildId, user.error);
|
|
|
|
|
|
+ const userInfo = await tryDo(client.bot.users.fetch(userId));
|
|
|
|
+ const userName = userInfo.ok ? `${userInfo.result.username}#${userInfo.result.discriminator}` : "???";
|
|
|
|
+ logger.warn("Couldn't %s for user %s (%s) on server %s because: %s", action, userId, userName, guild.guildId, user.error);
|
|
}
|
|
}
|
|
if (user.ok && await check(user.result, guild)) {
|
|
if (user.ok && await check(user.result, guild)) {
|
|
return true;
|
|
return true;
|