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 toolkit16mo 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/luna16mo ago
yes Or if you have the role object you can stringify it
xjanex
xjanexOP16mo ago
But when I write it with the example I erote it don't ping it
treble/luna
treble/luna16mo ago
what show how you do it
xjanex
xjanexOP16mo ago
Gemme a min
xjanex
xjanexOP16mo ago
xjanex
xjanexOP16mo ago
it doesnt ping it
d.js docs
d.js docs16mo 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
xjanexOP16mo ago
what is this
treble/luna
treble/luna16mo ago
thats basic js becauqe putting your value between {} wont magically make it appear
xjanex
xjanexOP16mo ago
so betwenn what? () or []
treble/luna
treble/luna16mo ago
Read.
xjanex
xjanexOP16mo ago
` this?
treble/luna
treble/luna16mo ago
Literally just read
xjanex
xjanexOP16mo ago
k i dont understant can u just tell me where do i put config.ownersRoleid
treble/luna
treble/luna16mo ago
this is rather basic js the docs cannot be more clear, it even has examples
xjanex
xjanexOP16mo ago
just tell FeelsBadMan tried and didnt work
treble/luna
treble/luna16mo ago
how did you try
xjanex
xjanexOP16mo ago
it said ${}
treble/luna
treble/luna16mo ago
Yes, and backticks
xjanex
xjanexOP16mo ago
where do i put the backticks
treble/luna
treble/luna16mo ago
around your string at this point this is not djs anymore, this is basic js
Want results from more Discord servers?
Add your server