import { REST, Routes } from "discord.js"; const { token, client_id, guild_id } = require("./config.json"); const commands = [ { name: "hello", description: "Replies 'world'", }, { name: "pullteams", description: "Pulls team channel members into addup channel", }, { name: "end", description: "Pulls team channel members into addup channel", }, { name: "fatkid", description: "Pulls addup channel members into fk channel and lists them", }, { name: "fk", description: "Pulls addup channel members into fk channel and lists them", } ]; const rest = new REST({ version: "10" }).setToken(token); try { console.log("Started refreshing application (/) commands."); await rest.put(Routes.applicationCommands(client_id), { body: commands, }); console.log("Successfully reloaded application (/) commands."); } catch (error) { console.error(error); }