What is returned when getting the value of a .addChannelOption subcommand?

^
11 Replies
d.js toolkit
d.js toolkit12mo 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.
SuperPEKKA336
SuperPEKKA33612mo ago
Also do i use .getString?
.addChannelOption(option =>
option.setName('channel')
.setDescription('The channel to send the announcement in')
.setRequired(true)),

const channel = interaction.options.getString('channel');
.addChannelOption(option =>
option.setName('channel')
.setDescription('The channel to send the announcement in')
.setRequired(true)),

const channel = interaction.options.getString('channel');
im trying to get the channel id from the .addChannelOption subcommand to use in cannel.send *channel.send edit: const channel = interaction.options.getChannel('channel'); how do i get the channelID from channel?
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA33612mo ago
i did
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA33612mo ago
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA33612mo ago
Also i have all my embeds in a JSON file and JSON doesnt support hexadecimal codes so whats an alternative for the color property? yeah but how would i implement it? i cant do "color": "0x0033ff", ? i tried that so "color": 0x0033ff` huh
SuperPEKKA336
SuperPEKKA33612mo ago
SuperPEKKA336
SuperPEKKA33612mo ago
SuperPEKKA336
SuperPEKKA33612mo ago
VSCode didnt liek that *like well yeah its in JSON format so i use json whats the dec value? RGB? so 13311 i thought it would convert to nvm how is it calculated? yeah