penguin-band/register.js
2023-11-29 01:59:15 -06:00

88 lines
2.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",
},
{
name: "scout",
description: "Lists picking channel members with scout role",
},
{
name: "soldier",
description: "Lists picking channel members with soldier role",
},
{
name: "pyro",
description: "Lists picking channel members with pyro role",
},
{
name: "demo",
description: "Lists picking channel members with demo role",
},
{
name: "demoman",
description: "Alias of /demo",
},
{
name: "heavy",
description: "Lists picking channel members with heavy role",
},
{
name: "engineer",
description: "Lists picking channel members with engineer role",
},
{
name: "engi",
description: "Alias of /engineer",
},
{
name: "medic",
description: "Lists picking channel members with medic role",
},
{
name: "sniper",
description: "Lists picking channel members with sniper role",
},
{
name: "spy",
description: "Lists picking channel members with spy role",
},
];
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);
}