const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v9');
const { SlashCommandBuilder } = require('@discordjs/builders');
// Place your client and guild ids here
const clientId = 'CLIENT_ID'; // actual client ID here
const guildId = 'GUILD_ID'; // actual guild ID here
const rest = new REST({ version: '9' }).setToken("TOKEN"); // actual token here
(async () => {
try {
console.log('Started refreshing application (/) commands.');
await rest.put(
Routes.applicationGuildCommands(clientId, guildId),
{ body: [
new SlashCommandBuilder()
.setName("message")
.setDescription("Sends the specified message to the user")
.addSubcommand(subcommand =>
subcommand
.setName("blacklist")
.setDescription("Informs a user of a LETI blacklist. For use by Command Staff.")
.addStringOption(option => option.setName("reason").setDescription("The reason for the blacklist"))
)
.addSubcommand(subcommand =>
subcommand
.setName("suspend")
.setDescription("Informs a user of a LETI suspension. For use by Command Staff.")
).toJSON()
]},
);
console.log('Successfully reloaded application (/) commands.');
} catch (error) {
console.error(error);
}
})();