Updated subcommand types
This commit is contained in:
@@ -24,17 +24,17 @@ export default {
|
||||
const subcommand = interaction.options.getSubcommand()
|
||||
|
||||
if (subcommand === "member") {
|
||||
await guildMember(interaction)
|
||||
await guildMember({ interaction })
|
||||
return
|
||||
}
|
||||
|
||||
if (subcommand === "info") {
|
||||
await guildInfo(interaction)
|
||||
await guildInfo({ interaction })
|
||||
return
|
||||
}
|
||||
|
||||
if (subcommand === "top") {
|
||||
await guildTop(interaction)
|
||||
await guildTop({ interaction })
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export const infoSub = new SlashCommandSubcommandBuilder()
|
||||
)
|
||||
)
|
||||
|
||||
const cmd: SubCommand = async (interaction) => {
|
||||
const cmd: SubCommand = async ({ interaction }) => {
|
||||
await interaction.deferReply()
|
||||
|
||||
const query = interaction.options.getString("query")!
|
||||
|
||||
@@ -16,7 +16,7 @@ export const memberSub = new SlashCommandSubcommandBuilder()
|
||||
.setRequired(true)
|
||||
)
|
||||
|
||||
const cmd: SubCommand = async (interaction) => {
|
||||
const cmd: SubCommand = async ({ interaction }) => {
|
||||
await interaction.deferReply()
|
||||
|
||||
const ign = interaction.options.getString("ign")!
|
||||
|
||||
@@ -30,7 +30,7 @@ export const topSub = new SlashCommandSubcommandBuilder()
|
||||
.setDescription("The amount of guild members to show. [Default: 10]")
|
||||
)
|
||||
|
||||
const cmd: SubCommand = async (interaction) => {
|
||||
const cmd: SubCommand = async ({ interaction }) => {
|
||||
await interaction.deferReply()
|
||||
|
||||
const query = interaction.options.getString("query")!
|
||||
|
||||
@@ -29,27 +29,27 @@ export default {
|
||||
const subcommand = interaction.options.getSubcommand()
|
||||
|
||||
if (subcommand === "help") {
|
||||
help(interaction, client)
|
||||
help({ interaction, client })
|
||||
return
|
||||
}
|
||||
|
||||
if (subcommand === "beast") {
|
||||
beast(interaction)
|
||||
beast({ interaction })
|
||||
return
|
||||
}
|
||||
|
||||
if (subcommand === "prune") {
|
||||
prune(interaction)
|
||||
prune({ interaction })
|
||||
return
|
||||
}
|
||||
|
||||
if (subcommand === "removeguildroles") {
|
||||
removeGuildRoles(interaction)
|
||||
removeGuildRoles({ interaction })
|
||||
return
|
||||
}
|
||||
|
||||
if (subcommand === "updateall") {
|
||||
updateAll(interaction)
|
||||
updateAll({ interaction })
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export const beastSub = new SlashCommandSubcommandBuilder()
|
||||
.setRequired(true)
|
||||
)
|
||||
|
||||
const cmd: SubCommand = async (interaction) => {
|
||||
const cmd: SubCommand = async ({ interaction }) => {
|
||||
await interaction.deferReply()
|
||||
|
||||
const ign = interaction.options.getString("ign")!
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType, MessageFlags, SlashCommandSubcommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options"
|
||||
import { SubCommmndClient } from "~/typings"
|
||||
import { SubCommand } from "~/typings"
|
||||
|
||||
export const helpSub = new SlashCommandSubcommandBuilder()
|
||||
.setName("help")
|
||||
.setDescription("Get help with staff commands")
|
||||
|
||||
const cmd: SubCommmndClient = async (interaction, client) => {
|
||||
const cmd: SubCommand<true> = async ({ interaction, client }) => {
|
||||
await interaction.deferReply()
|
||||
|
||||
type CommandList = {
|
||||
|
||||
@@ -7,7 +7,7 @@ export const pruneSub = new SlashCommandSubcommandBuilder()
|
||||
.setName("prune")
|
||||
.setDescription("Update the discord roles of all guild members")
|
||||
|
||||
const cmd: SubCommand = async (interaction) => {
|
||||
const cmd: SubCommand = async ({ interaction }) => {
|
||||
await interaction.deferReply()
|
||||
|
||||
if (interaction.user.id !== env.prod.DEV) {
|
||||
|
||||
@@ -10,7 +10,7 @@ export const removeGuildRolesSub = new SlashCommandSubcommandBuilder()
|
||||
.setName("removeguildroles")
|
||||
.setDescription("Remove guild roles from non members")
|
||||
|
||||
const cmd: SubCommand = async (interaction) => {
|
||||
const cmd: SubCommand = async ({ interaction }) => {
|
||||
await interaction.deferReply()
|
||||
|
||||
const discordMember = interaction.member as GuildMember
|
||||
|
||||
@@ -12,7 +12,7 @@ export const updateAllSub = new SlashCommandSubcommandBuilder()
|
||||
.setName("updateall")
|
||||
.setDescription("Update the discord roles of all guild members")
|
||||
|
||||
const cmd: SubCommand = async (interaction) => {
|
||||
const cmd: SubCommand = async ({ interaction }) => {
|
||||
await interaction.deferReply()
|
||||
|
||||
const discordMember = interaction.member as GuildMember
|
||||
|
||||
Reference in New Issue
Block a user