my idea is the following syntax:
“-> send <user> their <keyboard>”
“-> send <user> their <access-key>”
“-> send <user> out-of-the-server”
I tried to do it with this code:
const { SlashCommandBuilder } = require('discord.js');
module.exports = {
category: 'moderation',
data: new SlashCommandBuilder()
.setName('send')
.setDescription('Send the user items /to a place.')
.addUserOption(option => option
.setName('user')
.setDescription('The user to send items /to a place.')
.setRequired(true)
.addStringOption(option => option
.setName('their')
.setDescription('The item to send to she user.')
.setRequired(true)
.addChoices(
{ name: 'keyboard', value: 'their_keyboard' },
{ name: 'access-key', value: 'their_access-key' },
))
.addStringOption(option => option
.setName('out-of-the-server')
.setDescription('The item to send out-of-the-server.')
.setRequired(true)
.addChoices(
{ name: 'out-of-the-server', value: 'user_out-of-the-server' },
))
),
async execute(interaction) {
await interaction.reply('cute placeholder interaction');
},
};
But it doesn’t work.
New contributor
NFmtzX 1969 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.