Updated subcommands to use default export

This commit is contained in:
2024-01-04 21:37:11 +01:00
parent bada95acd7
commit f7e35029f7
8 changed files with 15 additions and 21 deletions

View File

@@ -1,9 +1,9 @@
import { SlashCommandBuilder } from "discord.js" import { SlashCommandBuilder } from "discord.js"
import { color, devMessage } from "../../config/options.json" import { color, devMessage } from "../../config/options.json"
import { Command } from "../interfaces" import { Command } from "../interfaces"
import guildMember = require("./guild/member") import guildMember from "./guild/member"
import guildInfo = require("./guild/info") import guildInfo from "./guild/info"
import guildTop = require("./guild/top") import guildTop from "./guild/top"
export = { export = {
name: "guild", name: "guild",

View File

@@ -9,7 +9,7 @@ import { color, devMessage } from "../../../config/options.json"
import { ChatInputCommandInteraction } from "discord.js" import { ChatInputCommandInteraction } from "discord.js"
import { GuildData } from "../../interfaces/Guild" import { GuildData } from "../../interfaces/Guild"
async function guildInfo( export default async function guildInfo(
interaction: ChatInputCommandInteraction, interaction: ChatInputCommandInteraction,
): Promise<void> { ): Promise<void> {
await interaction.deferReply() await interaction.deferReply()
@@ -242,5 +242,3 @@ async function guildInfo(
], ],
}) })
} }
export = guildInfo

View File

@@ -2,7 +2,7 @@ import { getUUID, getPlayer, getGuild, getHeadURL } from "../../utils/Hypixel"
import { color, devMessage } from "../../../config/options.json" import { color, devMessage } from "../../../config/options.json"
import { ChatInputCommandInteraction } from "discord.js" import { ChatInputCommandInteraction } from "discord.js"
async function guildMember( export default async function guildMember(
interaction: ChatInputCommandInteraction, interaction: ChatInputCommandInteraction,
): Promise<void> { ): Promise<void> {
await interaction.deferReply() await interaction.deferReply()
@@ -212,5 +212,3 @@ async function guildMember(
], ],
}) })
} }
export = guildMember

View File

@@ -5,7 +5,7 @@ import { GuildData } from "../../interfaces/Guild"
import Illegitimate from "../../utils/Illegitimate" import Illegitimate from "../../utils/Illegitimate"
const redis = Illegitimate.redis const redis = Illegitimate.redis
async function guildTop( export default async function guildTop(
interaction: ChatInputCommandInteraction, interaction: ChatInputCommandInteraction,
): Promise<void> { ): Promise<void> {
await interaction.deferReply() await interaction.deferReply()
@@ -292,5 +292,3 @@ async function guildTop(
], ],
}) })
} }
export = guildTop

View File

@@ -1,9 +1,9 @@
import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js" import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js"
import { color, devMessage } from "../../config/options.json" import { color, devMessage } from "../../config/options.json"
import { Command } from "../interfaces" import { Command } from "../interfaces"
import { help } from "./staff/help" import help from "./staff/help"
import { beast } from "./staff/beast" import beast from "./staff/beast"
import { updateDiscordRoles } from "./staff/updatediscordroles" import updateDiscordRoles from "./staff/updatediscordroles"
export = { export = {
name: "staff", name: "staff",

View File

@@ -19,7 +19,7 @@ import {
} from "../../utils/Hypixel" } from "../../utils/Hypixel"
import { ChatInputCommandInteraction } from "discord.js" import { ChatInputCommandInteraction } from "discord.js"
export async function beast( export default async function beast(
interaction: ChatInputCommandInteraction, interaction: ChatInputCommandInteraction,
): Promise<void> { ): Promise<void> {
await interaction.deferReply() await interaction.deferReply()

View File

@@ -2,7 +2,7 @@ import { ChatInputCommandInteraction } from "discord.js"
import { color, devMessage } from "../../../config/options.json" import { color, devMessage } from "../../../config/options.json"
import { ExtendedClient as Client } from "../../utils/Client" import { ExtendedClient as Client } from "../../utils/Client"
export async function help( export default async function help(
interaction: ChatInputCommandInteraction, interaction: ChatInputCommandInteraction,
client: Client, client: Client,
): Promise<void> { ): Promise<void> {

View File

@@ -6,7 +6,7 @@ import env from "../../utils/Env"
import { getGuild } from "../../utils/Hypixel" import { getGuild } from "../../utils/Hypixel"
import { GuildData } from "../../interfaces" import { GuildData } from "../../interfaces"
export async function updateDiscordRoles( export default async function updateDiscordRoles(
interaction: ChatInputCommandInteraction, interaction: ChatInputCommandInteraction,
): Promise<void> { ): Promise<void> {
const discordMember = interaction.member as GuildMember const discordMember = interaction.member as GuildMember