I want to ping a role from config.json with discord.js

Do I have to do it like this Ex: <@&{congif.ownersRoleid}> ??
22 Replies
d.js toolkit
d.js toolkit11mo ago
- 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. - Issue solved? Press the button!
treble/luna
treble/luna11mo ago
yes Or if you have the role object you can stringify it
xjanex
xjanex11mo ago
But when I write it with the example I erote it don't ping it
treble/luna
treble/luna11mo ago
what show how you do it
xjanex
xjanex11mo ago
Gemme a min
xjanex
xjanex11mo ago
xjanex
xjanex11mo ago
it doesnt ping it
d.js docs
d.js docs11mo ago
mdn Template literals (Template strings) Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, string interpolation with embedded expressions, and special constructs called tagged templates.
xjanex
xjanex11mo ago
what is this
treble/luna
treble/luna11mo ago
thats basic js becauqe putting your value between {} wont magically make it appear
xjanex
xjanex11mo ago
so betwenn what? () or []
treble/luna
treble/luna11mo ago
Read.
xjanex
xjanex11mo ago
` this?
treble/luna
treble/luna11mo ago
Literally just read
xjanex
xjanex11mo ago
k i dont understant can u just tell me where do i put config.ownersRoleid
treble/luna
treble/luna11mo ago
this is rather basic js the docs cannot be more clear, it even has examples
xjanex
xjanex11mo ago
just tell FeelsBadMan tried and didnt work
treble/luna
treble/luna11mo ago
how did you try
xjanex
xjanex11mo ago
it said ${}
treble/luna
treble/luna11mo ago
Yes, and backticks
xjanex
xjanex11mo ago
where do i put the backticks
treble/luna
treble/luna11mo ago
around your string at this point this is not djs anymore, this is basic js