Problem with found user in specific guild
I cant find and add role user in specific guild. Here is my code:
19 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!
- ✅
Marked as resolved by OPerror?
no errors only returning intreraction message cant find user in specific guild
guilds id is right
and user is in both guilds
idk which message says that
The cache will often not be populated with all the members, which is why fetching the member in that specific guild is better
i changed this
and now i have error
cant add role
what did you change?
cache to fetch
which line
all of them? they give the same error?
what did you change? can you send the updated code?
yes
thats- not how fetch works
u have to await it
Documentation suggestion for @n4a:
:method: GuildMemberManager#fetch()
Fetches member(s) from a guild.
And yes, you need to use the
await
keyword, fetch()
returns a promise that you need to resolve first before using itty guys
now its works