ghorsington 4 anni fa
parent
commit
71a1b0ef70
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      bot/src/rpc.ts

+ 3 - 1
bot/src/rpc.ts

@@ -31,7 +31,9 @@ async function checkUser(action: string, userId: string, check: (user: GuildMemb
         }
         const user = await tryDo(guildInstance.result.members.fetch(userId));
         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)) {
             return true;