How to get Member Object with message

Im trying to get a member of the author's message but i cant find the way. What i want to do is check if member has a role, i delete the role from passing some time since i added it. But without the member object, i cannot check it. What is the way for getting it?
17 Replies
d.js toolkit
d.js toolkit12mo ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Dhymbot
Dhymbot12mo ago
https://pasteb.in/?599a8070876b1045#Dqu9rik767c8qrC4F3Nj5c1K5AAZMH486Aq7qsq31d61 Here you have the code from the event any doubt tell me
d.js docs
d.js docs12mo ago
property Message#member Represents the author of the message as a guild member. Only available if the message comes from a guild where the author is still a member
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Dhymbot
Dhymbot12mo ago
im watching link rn im using message.member so i dont know why i cannot acces cache
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Dhymbot
Dhymbot12mo ago
by the way, on code that i shared appears "if (message.member.roles.has('1002155715256909895') === true) {" but im using message.member.roles.cache.has
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Dhymbot
Dhymbot12mo ago
in line 46 TypeError: Cannot read properties of undefined (reading 'cache') if i delete cache puts has is not a function or something similar
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Dhymbot
Dhymbot12mo ago
ok, im going to try
Dhymbot
Dhymbot12mo ago
Here's the guild member object
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Dhymbot
Dhymbot12mo ago
i had an skill issue on line 40 i commited some changes before creating the post and i forgot to edit that line for ussing the new message object
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Dhymbot
Dhymbot12mo ago
i coded the thing to hasty, the most part of the things seems fixed, im making changes until everything works fine if i note that i cannot solve something i tell everything is working fine thnx and srry, practically the problem was that i coded bad