How do I make the code?
const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName(`channelmsg`)
.setDescription("channel send msg")
.addChannelOption(option =>
option.setName('channel')
.setDescription('channel pick')
.setRequired(true))
.addStringOption(option =>
option.setName('msg')
.setDescription('pick')
.setRequired(true)
.addChoices(
{ name: '1', value: 'msg1' },
{ name: '2', value: 'msg2' },
{ name: '3', value: 'msg3' },
{ name: '4', value: 'msg4' }
)),
async execute(interaction, client) {
await interaction.reply({
components: [
]
});
},
};const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName(`channelmsg`)
.setDescription("channel send msg")
.addChannelOption(option =>
option.setName('channel')
.setDescription('channel pick')
.setRequired(true))
.addStringOption(option =>
option.setName('msg')
.setDescription('pick')
.setRequired(true)
.addChoices(
{ name: '1', value: 'msg1' },
{ name: '2', value: 'msg2' },
{ name: '3', value: 'msg3' },
{ name: '4', value: 'msg4' }
)),
async execute(interaction, client) {
await interaction.reply({
components: [
]
});
},
};I want to select a channel and make it send a message to that channel.
