Why does .content not work when it is in the array?
in my example the newName shows content in it but newName.content does not give back anything
9 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 OPWhat is newName supposed to be? The message? If it's really the content then <String>.content indeed does not exist
newName = message.first()
and i when i console log "newName" the content shows as "content: 'test'" but when i console log "newName .content" nothing happens
What is
message
?the messages sent in the channel
wait i did not show my code opps
the .content and .name dont work but they show in the list if you dont put them
here is what i'm saying. it shows content in the first log but the second one does nothing wich is the one with .content
the .name for the catagory does not workj
I dont think it has todo with the MESSAGECONTENT intent beacause it shows up while not using .content but does not show anything with
but then again when i put .channelId it shows the channel id
but for .content it does not
I dont understand how
newName[4]
can work
It otherwise looks right
Can you show the full logoh that was just something i put in
nothing todo with the broken part
but here is the updated code This clones a channel and renames the cloned channel to what you want
Don't forget the need of GatewayIntentBits.MessageContent