68 lines
2.0 KiB
TypeScript
68 lines
2.0 KiB
TypeScript
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, SlashCommandSubcommandBuilder } from "discord.js"
|
|
import { devMessage, embedColor } from "~/config/options"
|
|
import { ICommand } from "~/typings"
|
|
import beast, { beastSub } from "./staff/beast"
|
|
import help, { helpSub } from "./staff/help"
|
|
import prune, { pruneSub } from "./staff/prune"
|
|
import removeGuildRoles, { removeGuildRolesSub } from "./staff/removeguildroles"
|
|
import updateAll, { updateAllSub } from "./staff/updateall"
|
|
|
|
export default {
|
|
name: "staff",
|
|
description: "Subcommands for staff",
|
|
dev: false,
|
|
public: false,
|
|
subcommands: true,
|
|
|
|
data: new SlashCommandBuilder()
|
|
.setName("staff")
|
|
.setDescription("Subcommands for staff")
|
|
.addSubcommand(helpSub)
|
|
.addSubcommand(beastSub)
|
|
.addSubcommand(pruneSub)
|
|
.addSubcommand(removeGuildRolesSub)
|
|
.addSubcommand(updateAllSub)
|
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
|
.setContexts(InteractionContextType.Guild),
|
|
|
|
async execute({ interaction, client }) {
|
|
const subcommand = interaction.options.getSubcommand()
|
|
|
|
if (subcommand === "help") {
|
|
help(interaction, client)
|
|
return
|
|
}
|
|
|
|
if (subcommand === "beast") {
|
|
beast(interaction)
|
|
return
|
|
}
|
|
|
|
if (subcommand === "prune") {
|
|
prune(interaction)
|
|
return
|
|
}
|
|
|
|
if (subcommand === "removeguildroles") {
|
|
removeGuildRoles(interaction)
|
|
return
|
|
}
|
|
|
|
if (subcommand === "updateall") {
|
|
updateAll(interaction)
|
|
return
|
|
}
|
|
|
|
await interaction.reply({
|
|
embeds: [{
|
|
description: "This command is currently under development",
|
|
color: embedColor,
|
|
footer: {
|
|
text: interaction.guild!.name + " | " + devMessage,
|
|
icon_url: interaction.guild!.iconURL() || undefined
|
|
}
|
|
}]
|
|
})
|
|
}
|
|
} as ICommand
|