[ERROR] Encountered error on event listener "moderationLog"
Full Error: https://pastebin.com/GnkxtJqe
moderationLog Listener: https://pastebin.com/DLgksCHN
I'm calling the moderationLog Listener on the automodBan function:
No idea why it saying something about Line 17, the DM embed is sent without problems, the problem must be at the webhookEmbed since the webhook is not being sent, I have another function which does the same as automodBan except instead of banning it just adds a warn to the user's record, in this function both dm and webhook are sent without problems
Part of the error i'm talking about:
at ModerationLogListener.run (C:\Users\cmart\Desktop\Discord Bots\Sapphire\src\listeners\moderationLog.js:17:8)
Pastebin
Full Error - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
moderationLog.js - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
5 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!you pass in undefined in setTitle
You mean this?
If yes I logged both functions and both were defined
your error disagrees
yeah that was it, since it was a ban it returned undefined because there was no ban option in the function
and it was defined because I was trying it while the punishment type being warn