const cubcommand = { name: 'add', desc: 'Adds new event to the database', options: [ { type: 'str', name: 'name', desc: 'Name of the event you want to add', req: true } ] } new SlashCommandBuilder() .setName('event') .setDescription('Adds events to celebrate!') .addSubcommand(subcommand => subcommand.setName('add') .setDescription('Adds new event to the database') .addStringOption(option => option.setName('name') .setDescription('Name of the event you want to add') .setRequired(true)) .addIntegerOption(option => option.setName('day') .setDescription('Day of event') .setRequired(true)) .addIntegerOption(option => option.setName('month') .setDescription('Month of event') .setRequired(true)) .addBooleanOption(option => option.setName('global') .setDescription('Should this event display on all servers?')) .addStringOption(option => option.setName('special-message') .setDescription('Special message to send in event announcement'))) .addSubcommand(subcommand => subcommand.setName('delete') .setDescription('Deletes event from database') .addIntegerOption(option => option.setName('id') .setDescription('Id of the even you want to change') .setRequired(true))) .addSubcommandGroup(subcommandGroup => subcommandGroup.setName('change') .setDescription('Change the event entry') .addSubcommand(subcommand => subcommand.setName('date') .setDescription('Change date of an event') .addIntegerOption(option => option.setName('day') .setDescription('New event day') .setRequired(true)) .addIntegerOption(option => option.setName('month') .setDescription('New event month') .setRequired(true)) .addIntegerOption(option => option.setName('id') .setDescription('Id of the even you want to change') .setRequired(true))) .addSubcommand(subcommand => subcommand.setName('name') .setDescription('Change name of an event') .addStringOption(option => option.setName('new-name') .setDescription('New name of the event') .setRequired(true)) .addIntegerOption(option => option.setName('id') .setDescription('Id of the even you want to change') .setRequired(true))) .addSubcommand(subcommand => subcommand.setName('special-message') .setDescription('Change special message of an event') .addStringOption(option => option.setName('new-message') .setDescription('New special message') .setRequired(true)))) .addSubcommand(subcommand => subcommand.setName('list') .setDescription('List all events')),