0

I'm coding a Node.JS Discord bot and would like to have error messages stored in a separate JSON file. Though, in this JSON file there's template literals, like

{
    "error": "Oh snap! Better check this out: ${error}"
}

How would I go to use them?

Thanks,

Well I don't want to convert it, just a way to use it. Far from being a duplicate.

Greg01re
  • 97
  • 1
  • 9
  • *"Well I don't want to convert it, just a way to use it."* Well, what you have is a string, not a template literal. The short answer would be: You cannot use it. So you either have to convert the string to a template literal (bad) or use a proper template library (good). All these things are explained in the duplicate. – Felix Kling Sep 04 '16 at 02:35
  • I've found a way around. Thanks though. – Greg01re Sep 04 '16 at 14:35

0 Answers0