Is there a way to get the id of a channel by finding it using it's name?
If there isn't. Should this work instead?
13 Replies
• 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.That find syntax hasnt be correct since like..... v11
find(channel => channel.name === 'yara-audit-log')
error
^
interactionCreate.js:16:31
Its from there
Not this file
although maybe it is
What is ChannelTypefind
i have no idea
typo?
this is line 16
.setDescription(${error});
No
This isn't interactionCreate.js
Oh nvm I see now
it is
Yeah that's the error
how do i fix
error
not make an error?Seems like you meant to use a template literal?
yes
does the .setChannelOption covert the name of the channel into it;s id?
so if i type
#cheese
in the option. and i use const cheese = interaction.options.getChannel('name')
and i console.log(cheese). will it output #cheese
or the id of #cheese
?
if it outputs #cheese
can i do cheese.id
to get the id?
nvm i got itIt will output the whole channel object
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View