Reputation: 213
How to put url from field to config.json. But only the url, not the text. From this
.addField("**hi**", `[**Hello**](https:iegbshd)`)
to this
const { hello } = require('../config.json')
.addField("**hi**", `[**Hello**](hello)`)
config.json { "hello": "https:iegbshd" }
Upvotes: 1
Views: 549
Reputation: 2208
To use variables inside of `` quotes you need to put them into ${}
and get such code:
.addField("**hi**", `[**Hello**](${hello})`)
Upvotes: 4