Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
discord.js resolve function

I made a bot in discord.js v12 and want to update it to v13. While updating it, I noticed that client.resolveChannel, client.resolveMember etc. are no longer working, so I'm guessing that they removed it but if they didn't what is the current resolve function? If it got removed, how can you easily resolve a member with args preferably like this as you did in v12?

let user = await client.resolveMember(message.guild, args[0]);
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You can use these:

client.resolveMember(message.guild, args[0])

should be either GuildMemberManager#resolve or GuildMemberManager#fetch:

let user = message.guild.members.resolve(USER_ID)

// OR

let user = await message.guild.members.fetch(USER_ID)

Similarly

client.resolveChannel(message.guild, args[0])

should be either ChannelManager#resolve or ChannelManager#fetch

let channel = message.guild.channels.resolve(CHANNEL_ID)

// OR

let channel = await message.guild.channels.fetch(CHANNEL_ID)
about 4 years ago · Juan Pablo Isaza Report

0

Use Guild.members.resolve()

let user = message.guild.members.resolve(args[0])
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!