12 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!
@ʎǝɹquoɯ Can you help?
Can you read the rules
Ah sry
targetMember is undefined
its better to fetch members using
guild.members.fetch()
as they arent always cachedK
Let me try that
only if guild has more 75k members
in that case discord wont send all members
(only bot, and people in voice will returned)
so i would use
bot.rest.patch(Routes.guildMember(guildId, userId), {body: {communication_disabled_until: null}})
and never hope on cacheoh yeah i meant fetch individual members using
guild.members.fetch({ user: ... })
, lmao should have been specificAh k
I got it possible by fetching by id, not using an object
(This can also be achieved with
<Guild>.members.edit()
)i always prefer using raw api than wrapper
That's fine, but I'm just putting it out there since OP is using the wrapper that this server is for