🎨 data => builder

This commit is contained in:
Axel Olausson Holtenäs 2022-05-18 18:18:34 +02:00
parent 614d7c80f5
commit 7f0835813c
No known key found for this signature in database
GPG key ID: 7BF6826B76382CBA
46 changed files with 126 additions and 140 deletions

View file

@ -30,14 +30,17 @@
"@crowdin/ota-client": "^0.7.0",
"@discordjs/builders": "^0.13.0",
"@discordjs/rest": "^0.4.0",
"@types/i18next-fs-backend": "^1.1.2",
"axios": "^0.27.0",
"chance": "^1.1.8",
"common": "^0.2.5",
"crypto": "^1.0.1",
"discord-api-types": "^0.33.0",
"discord.js": "^13.6.0",
"i18n": "^0.14.2",
"i18next": "^21.6.13",
"i18next-async-backend": "^2.0.0",
"i18next-fs-backend": "^1.1.4",
"i18next-http-backend": "^1.4.0",
"i18next-resources-to-backend": "^1.0.0",
"mongoose": "^6.2.3",

View file

@ -13,7 +13,7 @@ export default async () => {
});
mongoose.connection.on("error", async (error) => {
logger.error(error);
logger.error(`${error}`);
});
mongoose.connection.on("warn", async (warning) => {

View file

@ -6,7 +6,7 @@ import logger from "@logger";
import { errorColor, footerText, footerIcon } from "@config/embed";
import i18next from "i18next";
import deferReply from "@root/helpers/deferReply";
import getCommandMeta from "@root/helpers/getCommandMeta";
import getCommandMetadata from "@root/helpers/getCommandMetadata";
export default async (interaction: CommandInteraction) => {
if (!interaction.isCommand()) return;
@ -19,14 +19,14 @@ export default async (interaction: CommandInteraction) => {
logger.silly(`Command ${commandName} not found`);
}
const meta = await getCommandMeta(interaction, currentCommand);
const metadata = await getCommandMetadata(interaction, currentCommand);
await deferReply(interaction, meta.ephemeral || false);
await deferReply(interaction, metadata.ephemeral || false);
if (
meta.permissions &&
meta.guildOnly &&
!memberPermissions?.has(meta.permissions)
metadata.permissions &&
metadata.guildOnly &&
!memberPermissions?.has(metadata.permissions)
) {
return interaction?.editReply({
embeds: [
@ -40,7 +40,7 @@ export default async (interaction: CommandInteraction) => {
});
}
if (meta.guildOnly) {
if (metadata.guildOnly) {
if (!guild) {
logger.verbose(`Guild is null`);
@ -61,7 +61,7 @@ export default async (interaction: CommandInteraction) => {
}
}
if (meta.dmOnly) {
if (metadata.dmOnly) {
if (guild) {
logger.verbose(`Guild exist`);

View file

@ -16,9 +16,9 @@ export default async (client: Client) => {
const plugin = await import(`../plugins/${pluginName}`);
await client.commands.set(
plugin.default.data.name,
plugin.default.builder.name,
plugin.default,
plugin.default.meta
plugin.default.metadata
);
})
)

View file

@ -12,9 +12,9 @@ export default async (client: Client) => {
await Promise.all(
client.commands.map(async (pluginData: any) => {
pluginList.push(pluginData.data.toJSON());
pluginList.push(pluginData.builder.toJSON());
logger.verbose(
`${pluginData.data.name} successfully pushed to plugin list.`
`${pluginData.builder.name} successfully pushed to plugin list.`
);
})
)
@ -22,7 +22,7 @@ export default async (client: Client) => {
logger.debug("Successfully pushed all plugins to plugin list.");
})
.catch(async (error) => {
logger.error(error);
logger.error(`${error}`);
});
const rest = new REST({ version: "9" }).setToken(token);
@ -35,7 +35,7 @@ export default async (client: Client) => {
logger.debug(`Successfully deployed plugins to Discord`);
})
.catch(async (error) => {
logger.error(error);
logger.error(`${error}`);
});
if (devMode) {
@ -47,7 +47,7 @@ export default async (client: Client) => {
logger.debug(`Successfully deployed guild plugins to Discord`)
)
.catch(async (error) => {
logger.error(error);
logger.error(`${error}`);
});
}
};

View file

@ -5,8 +5,8 @@ export default async (interaction: CommandInteraction, currentCommand: any) => {
const subcommandGroup = interaction.options.getSubcommandGroup(false);
if (!subcommandGroup) {
return currentCommand.modules[subcommand].meta;
return currentCommand.modules[subcommand].metadata;
}
return currentCommand.groups[subcommandGroup].modules[subcommand].meta;
return currentCommand.groups[subcommandGroup].modules[subcommand].metadata;
};

View file

@ -7,20 +7,20 @@ import modules from "@plugins/counters/modules";
export default {
modules,
data: new SlashCommandBuilder()
builder: new SlashCommandBuilder()
.setName("counters")
.setDescription("View guild counters")
.addSubcommand(modules.view.data),
.addSubcommand(modules.view.builder),
async execute(interaction: CommandInteraction) {
const { options } = interaction;
if (options?.getSubcommand() === "view") {
logger?.verbose(`Executing view subcommand`);
if (options.getSubcommand() === "view") {
logger.verbose(`Executing view subcommand`);
return modules.view.execute(interaction);
}
logger?.verbose(`Unknown subcommand ${options?.getSubcommand()}`);
logger.verbose(`Unknown subcommand ${options.getSubcommand()}`);
},
};

View file

@ -10,12 +10,11 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { ChannelType } from "discord-api-types/v10";
import counterSchema from "@schemas/counter";
import i18next from "i18next";
export default {
meta: { guildOnly: true, ephemeral: false },
metadata: { guildOnly: true, ephemeral: false },
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("view")
.setDescription(`View a guild counter`)
@ -31,17 +30,12 @@ export default {
},
execute: async (interaction: CommandInteraction) => {
const { options, guild, locale } = interaction;
const { options, guild } = interaction;
const discordChannel = options?.getChannel("channel");
const embed = new MessageEmbed()
.setTitle(
i18next.t("counters:modules:view:general:title", {
lng: locale,
ns: "plugins",
})
)
.setTitle("[:1234:] Counters (View)")
.setTimestamp(new Date())
.setFooter({
text: footerText,
@ -57,13 +51,7 @@ export default {
return interaction?.editReply({
embeds: [
embed
.setDescription(
i18next.t("counters:modules:view:error01:description", {
lng: locale,
ns: "plugins",
channel: discordChannel,
})
)
.setDescription(`No counter found for channel ${discordChannel}!`)
.setColor(errorColor),
],
});
@ -73,12 +61,7 @@ export default {
embeds: [
embed
.setDescription(
i18next.t("counters:modules:view:success01:description", {
lng: locale,
ns: "plugins",
channel: discordChannel,
amount: counter.counter,
})
`Viewing counter for channel ${discordChannel}: ${counter.counter}!`
)
.setColor(successColor),
],

View file

@ -7,14 +7,14 @@ import modules from "@plugins/credits/modules";
export default {
modules,
data: new SlashCommandBuilder()
builder: new SlashCommandBuilder()
.setName("credits")
.setDescription("Manage your credits.")
.addSubcommand(modules.balance.data)
.addSubcommand(modules.gift.data)
.addSubcommand(modules.top.data)
.addSubcommand(modules.work.data),
.addSubcommand(modules.balance.builder)
.addSubcommand(modules.gift.builder)
.addSubcommand(modules.top.builder)
.addSubcommand(modules.work.builder),
async execute(interaction: CommandInteraction) {
const { options } = interaction;

View file

@ -13,8 +13,8 @@ import logger from "@logger";
import fetchUser from "@helpers/fetchUser";
export default {
meta: { guildOnly: true, ephemeral: true },
data: (command: SlashCommandSubcommandBuilder) => {
metadata: { guildOnly: true, ephemeral: true },
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("balance")
.setDescription(`View a user's balance`)

View file

@ -22,9 +22,9 @@ import i18next from "i18next";
// Function
export default {
meta: { guildOnly: true, ephemeral: true },
metadata: { guildOnly: true, ephemeral: true },
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("gift")
.setDescription(`Gift a user credits`)

View file

@ -13,9 +13,9 @@ import logger from "@logger";
import userSchema, { IUser } from "@schemas/user";
export default {
meta: { guildOnly: true, ephemeral: false },
metadata: { guildOnly: true, ephemeral: false },
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command.setName("top").setDescription(`View the top users`);
},
execute: async (interaction: CommandInteraction) => {

View file

@ -23,9 +23,9 @@ import fetchGuild from "@helpers/fetchGuild";
import i18next from "i18next";
export default {
meta: { guildOnly: true, ephemeral: true },
metadata: { guildOnly: true, ephemeral: true },
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command.setName("work").setDescription(`Work to earn credits`);
},
execute: async (interaction: CommandInteraction) => {

View file

@ -7,11 +7,11 @@ import modules from "@plugins/fun/modules";
export default {
modules,
data: new SlashCommandBuilder()
builder: new SlashCommandBuilder()
.setName("fun")
.setDescription("Fun commands.")
.addSubcommand(modules.meme.data),
.addSubcommand(modules.meme.builder),
async execute(interaction: CommandInteraction) {
const { options } = interaction;

View file

@ -6,9 +6,9 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import logger from "@logger";
export default {
meta: { guildOnly: false, ephemeral: false },
metadata: { guildOnly: false, ephemeral: false },
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command.setName("meme").setDescription("Get a meme from r/memes)");
},
execute: async (interaction: CommandInteraction) => {

View file

@ -11,12 +11,12 @@ import modules from "./modules";
export default {
modules,
data: (group: SlashCommandSubcommandGroupBuilder) => {
builder: (group: SlashCommandSubcommandGroupBuilder) => {
return group
.setName("counters")
.setDescription("Manage guild counters.")
.addSubcommand(modules.add.data)
.addSubcommand(modules.remove.data);
.addSubcommand(modules.add.builder)
.addSubcommand(modules.remove.builder);
},
execute: async (interaction: CommandInteraction) => {

View file

@ -20,13 +20,13 @@ import i18next from "i18next";
// Function
export default {
meta: {
metadata: {
guildOnly: true,
ephemeral: true,
permissions: [Permissions.FLAGS.MANAGE_GUILD],
},
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("add")
.setDescription("Add a counter to your guild.")

View file

@ -20,13 +20,13 @@ import i18next from "i18next";
// Function
export default {
meta: {
metadata: {
guildOnly: true,
ephemeral: true,
permissions: [Permissions.FLAGS.MANAGE_GUILD],
},
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("remove")
.setDescription(`Delete a counter from your guild.`)

View file

@ -7,14 +7,14 @@ import modules from "./modules";
export default {
modules,
data: (group: SlashCommandSubcommandGroupBuilder) => {
builder: (group: SlashCommandSubcommandGroupBuilder) => {
return group
.setName("credits")
.setDescription("Manage the credits of a user.")
.addSubcommand(modules.give.data)
.addSubcommand(modules.set.data)
.addSubcommand(modules.take.data)
.addSubcommand(modules.transfer.data);
.addSubcommand(modules.give.builder)
.addSubcommand(modules.set.builder)
.addSubcommand(modules.take.builder)
.addSubcommand(modules.transfer.builder);
},
execute: async (interaction: CommandInteraction) => {
const { options } = interaction;

View file

@ -21,13 +21,13 @@ import fetchUser from "@helpers/fetchUser";
// Function
export default {
meta: {
metadata: {
guildOnly: true,
ephemeral: true,
permissions: [Permissions.FLAGS.MANAGE_GUILD],
},
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("give")
.setDescription("Give credits to a user.")

View file

@ -20,13 +20,13 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
// Function
export default {
meta: {
metadata: {
guildOnly: true,
ephemeral: true,
permissions: [Permissions.FLAGS.MANAGE_GUILD],
},
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("set")
.setDescription("Set the amount of credits a user has.")

View file

@ -21,13 +21,13 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
// Function
export default {
meta: {
metadata: {
guildOnly: true,
ephemeral: true,
permissions: [Permissions.FLAGS.MANAGE_GUILD],
},
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("take")
.setDescription("Take credits from a user.")

View file

@ -21,13 +21,13 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
// Function
export default {
meta: {
metadata: {
guildOnly: true,
ephemeral: true,
permissions: [Permissions.FLAGS.MANAGE_GUILD],
},
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("transfer")
.setDescription("Transfer credits from one user to another.")

View file

@ -10,11 +10,11 @@ import logger from "@logger";
export default {
groups,
data: new SlashCommandBuilder()
builder: new SlashCommandBuilder()
.setName("manage")
.setDescription("Manage the bot.")
.addSubcommandGroup(groups.counters.data)
.addSubcommandGroup(groups.credits.data),
.addSubcommandGroup(groups.counters.builder)
.addSubcommandGroup(groups.credits.builder),
async execute(interaction: CommandInteraction) {
// Destructure

View file

@ -12,10 +12,10 @@ import logger from "@logger";
export default {
modules,
data: new SlashCommandBuilder()
builder: new SlashCommandBuilder()
.setName("profile")
.setDescription("Check a profile.")
.addSubcommand(modules.view.data),
.addSubcommand(modules.view.builder),
async execute(interaction: CommandInteraction) {
const { options } = interaction;

View file

@ -12,9 +12,9 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
// Function
export default {
meta: { guildOnly: true, ephemeral: false },
metadata: { guildOnly: true, ephemeral: false },
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("view")
.setDescription("View a profile.")

View file

@ -11,10 +11,10 @@ import logger from "@logger";
// Function
export default {
modules,
data: new SlashCommandBuilder()
builder: new SlashCommandBuilder()
.setName("reputation")
.setDescription("Manage reputation.")
.addSubcommand(modules.give.data),
.addSubcommand(modules.give.builder),
async execute(interaction: CommandInteraction) {
const { options } = interaction;

View file

@ -21,9 +21,9 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
// Function
export default {
meta: { guildOnly: true, ephemeral: true },
metadata: { guildOnly: true, ephemeral: true },
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("give")
.setDescription("Give reputation to a user")

View file

@ -13,16 +13,16 @@ import { SlashCommandSubcommandGroupBuilder } from "@discordjs/builders";
export default {
modules,
data: (group: SlashCommandSubcommandGroupBuilder) => {
builder: (group: SlashCommandSubcommandGroupBuilder) => {
return group
.setName("guild")
.setDescription("Guild settings.")
.addSubcommand(modules.pterodactyl.data)
.addSubcommand(modules.credits.data)
.addSubcommand(modules.points.data)
.addSubcommand(modules.welcome.data)
.addSubcommand(modules.audits.data)
.addSubcommand(modules.shop.data);
.addSubcommand(modules.pterodactyl.builder)
.addSubcommand(modules.credits.builder)
.addSubcommand(modules.points.builder)
.addSubcommand(modules.welcome.builder)
.addSubcommand(modules.audits.builder)
.addSubcommand(modules.shop.builder);
},
execute: async (interaction: CommandInteraction) => {
// Destructure member

View file

@ -14,13 +14,13 @@ import { ChannelType } from "discord-api-types/v10";
// Function
export default {
meta: {
metadata: {
guildOnly: true,
ephemeral: true,
permissions: [Permissions.FLAGS.MANAGE_GUILD],
},
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("audits")
.setDescription("Audits")

View file

@ -13,13 +13,13 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
// Function
export default {
meta: {
metadata: {
guildOnly: true,
ephemeral: true,
permissions: [Permissions.FLAGS.MANAGE_GUILD],
},
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("credits")
.setDescription(`Credits`)

View file

@ -13,13 +13,13 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
// Function
export default {
meta: {
metadata: {
guildOnly: true,
ephemeral: true,
permissions: [Permissions.FLAGS.MANAGE_GUILD],
},
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("points")
.setDescription("Points")

View file

@ -14,13 +14,13 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
// Function
export default {
meta: {
metadata: {
guildOnly: true,
ephemeral: true,
permissions: [Permissions.FLAGS.MANAGE_GUILD],
},
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("pterodactyl")
.setDescription("Controlpanel.gg")

View file

@ -13,13 +13,13 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
// Function
export default {
meta: {
metadata: {
guildOnly: true,
ephemeral: true,
permissions: [Permissions.FLAGS.MANAGE_GUILD],
},
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("shop")
.setDescription("Shop")

View file

@ -14,13 +14,13 @@ import { ChannelType } from "discord-api-types/v10";
// Function
export default {
meta: {
metadata: {
guildOnly: true,
ephemeral: true,
permissions: [Permissions.FLAGS.MANAGE_GUILD],
},
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("welcome")
.setDescription("Welcome")

View file

@ -12,11 +12,11 @@ import logger from "@logger";
export default {
groups,
data: new SlashCommandBuilder()
builder: new SlashCommandBuilder()
.setName("settings")
.setDescription("Manage settings.")
.addSubcommandGroup(groups.guild.data),
.addSubcommandGroup(groups.guild.builder),
async execute(interaction: CommandInteraction) {
const { options } = interaction;

View file

@ -16,12 +16,12 @@ import guildSchema from "@schemas/guild";
export default {
modules,
data: (group: SlashCommandSubcommandGroupBuilder) => {
builder: (group: SlashCommandSubcommandGroupBuilder) => {
return group
.setName("roles")
.setDescription("Shop for custom roles.")
.addSubcommand(modules.buy.data)
.addSubcommand(modules.cancel.data);
.addSubcommand(modules.buy.builder)
.addSubcommand(modules.cancel.builder);
},
execute: async (interaction: CommandInteraction) => {
const { options, guild } = interaction;

View file

@ -25,9 +25,9 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
// Function
export default {
meta: { guildOnly: true, ephemeral: true },
metadata: { guildOnly: true, ephemeral: true },
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("buy")
.setDescription("Buy a custom role.")

View file

@ -20,9 +20,9 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
// Function
export default {
meta: { guildOnly: true, ephemeral: true },
metadata: { guildOnly: true, ephemeral: true },
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("cancel")
.setDescription("Cancel a purchase.")

View file

@ -16,11 +16,11 @@ export default {
modules,
groups,
data: new SlashCommandBuilder()
builder: new SlashCommandBuilder()
.setName("shop")
.setDescription("Shop for credits and custom roles.")
.addSubcommand(modules.pterodactyl.data)
.addSubcommandGroup(groups.roles.data),
.addSubcommand(modules.pterodactyl.builder)
.addSubcommandGroup(groups.roles.builder),
async execute(interaction: CommandInteraction) {
const { options } = interaction;

View file

@ -19,9 +19,9 @@ import fetchUser from "@helpers/fetchUser";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
export default {
meta: { guildOnly: true, ephemeral: true },
metadata: { guildOnly: true, ephemeral: true },
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("pterodactyl")
.setDescription("Buy pterodactyl power.")

View file

@ -12,14 +12,14 @@ import logger from "../../logger";
export default {
modules,
data: new SlashCommandBuilder()
builder: new SlashCommandBuilder()
.setName("utility")
.setDescription("Common utility.")
.addSubcommand(modules.lookup.data)
.addSubcommand(modules.about.data)
.addSubcommand(modules.stats.data)
.addSubcommand(modules.avatar.data),
.addSubcommand(modules.lookup.builder)
.addSubcommand(modules.about.builder)
.addSubcommand(modules.stats.builder)
.addSubcommand(modules.avatar.builder),
async execute(interaction: CommandInteraction) {
const { options } = interaction;

View file

@ -9,9 +9,9 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
// Function
export default {
meta: { guildOnly: false, ephemeral: false },
metadata: { guildOnly: false, ephemeral: false },
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command.setName("about").setDescription("About this bot!)");
},
execute: async (interaction: CommandInteraction) => {

View file

@ -5,9 +5,9 @@ import { CommandInteraction, MessageEmbed } from "discord.js";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
export default {
meta: { guildOnly: false, ephemeral: false },
metadata: { guildOnly: false, ephemeral: false },
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("avatar")
.setDescription("Check someones avatar!)")

View file

@ -14,9 +14,9 @@ import logger from "@logger";
import embedBuilder from "@root/helpers/embedBuilder";
export default {
meta: { guildOnly: false, ephemeral: false },
metadata: { guildOnly: false, ephemeral: false },
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("lookup")
.setDescription(

View file

@ -2,9 +2,9 @@ import { successColor, footerText, footerIcon } from "@config/embed";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { CommandInteraction } from "discord.js";
export default {
meta: { guildOnly: false, ephemeral: false },
metadata: { guildOnly: false, ephemeral: false },
data: (command: SlashCommandSubcommandBuilder) => {
builder: (command: SlashCommandSubcommandBuilder) => {
return command.setName("stats").setDescription("Check bot statistics!)");
},
execute: async (interaction: CommandInteraction) => {