34 Replies
• 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.Looks like you have an error in your console
. . . .
didnt notice
RULES
is undefined, most likely gonna be an error along the lines of "ModelType ...."yes it is
RULES
is apart of the EMBEDS
object in your json, not the main json object itselfso?
Well, json.RULES doesn't exist, so it's undefined. You're deatructuring
RULES
from the json not from EMBEDS
json.EMBEDS.RULES existso
how do i define that
Lol you don't gotta ghost ping, n I already told you how to
embeds: EMBEDS.RULES
?Put it in an array
embeds: [EMBEDS.RULES]
?Ye
invalid body form
Show the top of the error, the error message
The color you put for the embed has to be a number
ah
wait
not hexadecimel?
Use
resolveColor('hex')
?
Remove the color from the string in the json
"0x00..." => 0x00....
what does it want in the "color" property?
an int?
Wait I jus remembered, I don't think json accepts hexadecimal numbers
embeds: [{ color: ...., ...EMBEDS.RULES }] try that
ok
can i just define is as
const BLUE = 0x0033ff
and "color": BLUE
It's always worth a shot but I don't think so.
hm
how would i do this?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
huh
You need to send an array of objects (
[ {} ]
) not an object of arrays ({ [] }
)
So you need
Be sure to remove the color from the embed itself in your json.Unknown User•2y ago
Message Not Public
Sign In & Join Server To View