Moved subcommand builder to their files
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
||||
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, SlashCommandSubcommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options"
|
||||
import { ICommand } from "~/typings"
|
||||
import beast from "./staff/beast"
|
||||
import help from "./staff/help"
|
||||
import prune from "./staff/prune"
|
||||
import removeGuildRoles from "./staff/removeguildroles"
|
||||
import updateAll from "./staff/updateall"
|
||||
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",
|
||||
@@ -17,37 +17,11 @@ export default {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("staff")
|
||||
.setDescription("Subcommands for staff")
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand
|
||||
.setName("help")
|
||||
.setDescription("Get help with staff commands")
|
||||
)
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand
|
||||
.setName("beast")
|
||||
.setDescription("Check a user for beast reqs")
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setName("ign")
|
||||
.setDescription("The IGN of the player.")
|
||||
.setRequired(true)
|
||||
)
|
||||
)
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand
|
||||
.setName("prune")
|
||||
.setDescription("Update the discord roles of all guild members")
|
||||
)
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand
|
||||
.setName("removeguildroles")
|
||||
.setDescription("Remove guild roles from non members")
|
||||
)
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand
|
||||
.setName("updateall")
|
||||
.setDescription("Update the discord roles of all guild members")
|
||||
)
|
||||
.addSubcommand(helpSub)
|
||||
.addSubcommand(beastSub)
|
||||
.addSubcommand(pruneSub)
|
||||
.addSubcommand(removeGuildRolesSub)
|
||||
.addSubcommand(updateAllSub)
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setContexts(InteractionContextType.Guild),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user