import { REST, Routes, SlashCommandBuilder } from "discord.js";

const rest = new REST().setToken(env.DISCORD_TOKEN);
const command = new SlashCommandBuilder()
  .setName("new-command")
  .setDescription("Provides information about the server.");
const data = await rest.put(
  Routes.applicationCommands(env.DISCORD_APP_ID),
  { body: [command.toJSON()] },
);

console.log(
  `Successfully reloaded ${data.length} application (/) commands.`,
);