handle newline in string for build embed
Hello so i decided to make an slash command for build embed message, and on of option is description of building embed, but after type an
some text\nanother some text
looks like this, and it is my question. how to handle newline in string and make it in embed?6 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.string.replaceAll("\n", "\n") should work
\\n
.replaceAll("\\n
", "\n")
still doesn't work
using
\\n
and \n
in string optiondescription = description.replaceAll(...)
Or
getString(...)?.replaceAll(...)
Or .setDescription(description.replaceAll(...))
bless you variable = variable.replaceall works fine
All of them would work