Nevyllo Kalangi
Nevyllo Kalangi

Reputation: 213

Embed fields URL discord js

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

Answers (1)

MegaMix_Craft
MegaMix_Craft

Reputation: 2208

To use variables inside of `` quotes you need to put them into ${} and get such code:

.addField("**hi**", `[**Hello**](${hello})`)

Upvotes: 4

Related Questions