Moved subcommand builder to their files
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options"
|
||||
import { ICommand } from "~/typings"
|
||||
import guildInfo from "./guild/info"
|
||||
import guildMember from "./guild/member"
|
||||
import guildTop from "./guild/top"
|
||||
import guildInfo, { infoSub } from "./guild/info"
|
||||
import guildMember, { memberSub } from "./guild/member"
|
||||
import guildTop, { topSub } from "./guild/top"
|
||||
|
||||
export default {
|
||||
name: "guild",
|
||||
@@ -15,66 +15,9 @@ export default {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("guild")
|
||||
.setDescription("Subcommands for guilds")
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand
|
||||
.setName("member")
|
||||
.setDescription("Get info about a guild memeber")
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setName("ign")
|
||||
.setDescription("The IGN of the player.")
|
||||
.setMinLength(3)
|
||||
.setMaxLength(16)
|
||||
.setRequired(true)
|
||||
)
|
||||
)
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand
|
||||
.setName("info")
|
||||
.setDescription("Get info about a guild.")
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setName("query")
|
||||
.setDescription("The query to search for. [Default: player]")
|
||||
.setRequired(true)
|
||||
)
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setName("type")
|
||||
.setDescription("The type of query.")
|
||||
.addChoices(
|
||||
{ name: "Guild Member", value: "ign" },
|
||||
{ name: "Guild Name", value: "name" },
|
||||
{ name: "Guild Id", value: "id" }
|
||||
)
|
||||
)
|
||||
)
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand
|
||||
.setName("top")
|
||||
.setDescription("Get the top guild members based on gexp")
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setName("query")
|
||||
.setDescription("The query to search for. [Default: player]")
|
||||
.setRequired(true)
|
||||
)
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setName("type")
|
||||
.setDescription("The type of query.")
|
||||
.addChoices(
|
||||
{ name: "Guild Member", value: "ign" },
|
||||
{ name: "Guild Name", value: "name" },
|
||||
{ name: "Guild Id", value: "id" }
|
||||
)
|
||||
)
|
||||
.addNumberOption(option =>
|
||||
option
|
||||
.setName("amount")
|
||||
.setDescription("The amount of guild members to show. [Default: 10]")
|
||||
)
|
||||
)
|
||||
.addSubcommand(memberSub)
|
||||
.addSubcommand(infoSub)
|
||||
.addSubcommand(topSub)
|
||||
.setContexts(InteractionContextType.Guild),
|
||||
|
||||
async execute({ interaction }) {
|
||||
|
||||
Reference in New Issue
Block a user