Bot get crash if import external list with/without async
My Code
embeds.js: https://pastebin.com/k6j32mSM
lang_parser.js: https://pastebin.com/qsM14GiF
Fragment from utils.js: https://pastebin.com/Gw3ZgFnR
My Error: https://pastebin.com/ZUGnr0kK
24 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!Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Please Wait I will update it, but I also have to look for everything
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Alright
@Jô 🌈 🦄 Can you help me ?
run your code with the --enable-source-maps flag to see where the error comes from
somewhere you’re sending a message with an empty object in embeds
OK
alright that did not help much
what else do you need ?
uhhh
when does this error, error
Embed builder return:
It should work
and data from fields
the issue isn't with the embed you built, it's where you send it
Hmm
I updated my code to send trigger if play
and first message send without problems
useEmbed relates to: https://pastebin.com/Gw3ZgFnR
where do you define useEmbed
in above link
you define getEmbed in that
ohh, sorry: https://pastebin.com/k6j32mSM
useEmbed returns a promise
yes, Is my solution is to add await ?
yes/no
either dont make useEmbed an async function
or await it
you dont even use await in the useEmbed function
Thanks, problem solved ✅
without Crash