Escape Character causing issue in fetching user info
I'm trying to fetch member info using the globalName of users but if a globalName contains a escape character it fails to fetch the info.
for the first name this code is able to fetch member info but fails for second one.
5 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!1.- you arent fetching anything
2.- you cant fetch by name
You cant get a user by their name unless its cached (the bot received an event regarding that user)
for first name I'm gettig complete user information
You cant get a user by their name unless its cached (the bot received an event regarding that user)
Thanks got it working I cached all members using guild.members.fetch() and removed '\' from name to fetch the user