How to get username from client id after the user has left the guild
How to get username from client id after the user has left the guild I have: bot.users.get(id) but when user leave the server an error pops up. Can I get the username with the ID differently if the user is not on the server? I have statistics. I am downloading from the User Id database and I am replacing the ID with its name, but if the user has left the server, there is an error because there is no such user. What can I do? How do you plan on getting the id if the user is not on the server anymore. Input? – Rishav Jun 29 at 10:53 1 Answer 1 Since client.users stores only cached users, you won't be able to retrieve their username in a reliable way from there. client.users DISCLAIMER : This method is really inefficient, but discord.js hasn't bee...