penguin-band/register.js

44 lines
1.0 KiB
JavaScript

import { REST, Routes } from "discord.js";
const { TOKEN, CLIENT_ID } = require("./config.json");
const commands = [
{
name: "hello",
description: "Replies 'world'",
},
{
name: "topicking",
description: "Pulls team and addup channel members into picking channel",
},
{
name: "end",
description: "Pulls team and addup channel members into picking channel",
},
{
name: "resetteams",
description: "Pulls team channel members into picking 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);
}