𝑨𝒃𝒔𝒐𝒍𝒖𝒕𝒆 𝑪𝒂𝒓𝒏𝒂𝒈𝒆
DIdiscord.js - Imagine ❄
•Created by 𝑨𝒃𝒔𝒐𝒍𝒖𝒕𝒆 𝑪𝒂𝒓𝒏𝒂𝒈𝒆 on 12/31/2024 in #djs-questions
error when deploying commands
i think the error is about subcommands and the only command i have with subcommands is this one:
data: new SlashCommandBuilder()
.setName('echo')
.setDescription('Sends the message as the Bot')
.addSubcommand(subcommand =>
subcommand.setName('normal')
.setDescription('Sends a normal message')
.addStringOption(option =>
option.setName('message')
.setDescription('The message to send')
.setRequired(true)
)
)
.addSubcommand(subcommand =>
subcommand.setName('embed')
.setDescription('Sends an embed message')
.addStringOption(option =>
option.setName('description')
.setDescription('The description of the embed')
.setRequired(true)
)
.addStringOption(option =>
option.setName('title')
.setDescription('The title of the embed')
)
.addStringOption(option =>
option.setName('timestamp')
.setDescription('Should the embed have a timestamp?')
.addChoices(
{ name: 'True', value: 'true' },
{ name: 'False', value: 'false' }
)
)
)
.addStringOption(option =>
option.setName('replyornor')
.setDescription('Should the message be sent as a command reply or separate message?')
.addChoices(
{ name: 'Reply', value: 'The message will be sent as a reply to the command'},
{ name: 'Message', value: 'The message will be sent as a separate message'}
)
)
.setIntegrationTypes([ApplicationIntegrationType.UserInstall])
.setContexts([InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel]),
data: new SlashCommandBuilder()
.setName('echo')
.setDescription('Sends the message as the Bot')
.addSubcommand(subcommand =>
subcommand.setName('normal')
.setDescription('Sends a normal message')
.addStringOption(option =>
option.setName('message')
.setDescription('The message to send')
.setRequired(true)
)
)
.addSubcommand(subcommand =>
subcommand.setName('embed')
.setDescription('Sends an embed message')
.addStringOption(option =>
option.setName('description')
.setDescription('The description of the embed')
.setRequired(true)
)
.addStringOption(option =>
option.setName('title')
.setDescription('The title of the embed')
)
.addStringOption(option =>
option.setName('timestamp')
.setDescription('Should the embed have a timestamp?')
.addChoices(
{ name: 'True', value: 'true' },
{ name: 'False', value: 'false' }
)
)
)
.addStringOption(option =>
option.setName('replyornor')
.setDescription('Should the message be sent as a command reply or separate message?')
.addChoices(
{ name: 'Reply', value: 'The message will be sent as a reply to the command'},
{ name: 'Message', value: 'The message will be sent as a separate message'}
)
)
.setIntegrationTypes([ApplicationIntegrationType.UserInstall])
.setContexts([InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel]),
7 replies