Get user ID from username

Is it possible to get someone's discord id from their username if the bot shares a server with them. I'd rather not iterate through client.guild.members.fetch() and then fetching each individual user to get their username property if possible Basically i wanna get my discord id 105835949107273728 from my username nekohikaru Thanks!
2 Replies
d.js toolkit
d.js toolkit3mo ago
- 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! - Marked as resolved by OP
d.js docs
d.js docs3mo ago
:method: GuildMemberManager#search() Searches for members in the guild based on a query.