How to get the user id, username, nick when mentioned by another user
I tried
m.mentions.members.first()
but to no avail it didn't work as expected due to the mentions
property being undefined
despite mentioning someone. Any help would be appreciated!
Here's the brief code:
15 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 OPWhere is the message coming from, DM or channel?
message.members
don't exist in a DM channel messageOh I forgot to note that, it is indeed from a channel
can you log m and show the output
this?
no, log m first thing in the function
console.log(m)
I sent the message with a mention still null?
can you please show the whole thing
alrighty holdon
thats not a djs message object then
m.message is
ooo i see
so i'll have to do
m.message
first ?yes
Omg it worked! Thank you
:reallyFckingCuteCatThumbsUp: