error getting the value of a embed's field.
In this ticket sistem when a ticket is closed it gets a specific value of the first field of the embed message that the bot sends when the ticket is opened.
Code: https://sourceb.in/jy4GvIfhrO
Code Error:
17 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 OPan embed has a data property
in which the data is stored
show your code
then that message does not have any embeds
it does
it has two embeds
log embeds
?
log <Message>.embeds
ok
oh it doesn't log the right embed
it seems like it doesn't fetch the right message
the first message of the channel
that is expected
your above code will just fetch the last message
you can store the id of the message, or iirc you can specify after and set it to 0
and how to fetch the first msg
without storing it
set
after
to 0 when fetching, should workhave i to keep
const firstmessage = messages.first();
or not?
and the limit to 1yes
it works
ty