I’ve been trying to make a discord bot to make custom embeds. Essentially, I’m trying to parse out a giant string of text and create individual fields without having to waste time making multiple field adjustments. In order to do so, I’ve tried nest a forEach statement inside the field itself, but JS doesn’t seem to like that. I’m not quite sure how to cast this without using a variable inside the message call. Any ideas?
Thank you! That was helpful. My program now flows like it should without errors, but it’s not assigning the values into the fields like it should. They all just still show as undefined. But I know that the array is populated with information. I tested it. This is how I worked your code into my code:
It’s hard to say really without a context and without seeing the whole code that surrounds it. It’s all too abstract for me to figure out what is going on.
Which fields are undefined? What are the Roles ? What is the output of these console.logs?