🔥 deprecated profile

This commit is contained in:
Axel Olausson Holtenäs 2022-10-20 13:45:11 +02:00
parent 5e7a30169b
commit 9a513dd860
3 changed files with 0 additions and 108 deletions

View file

@ -1,31 +0,0 @@
// Dependencies
import { SlashCommandBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction } from "discord.js";
// Modules
import modules from "./modules";
// Handlers
export const moduleData = modules;
// Function
export const builder = new SlashCommandBuilder()
.setName("profile")
.setDescription("Check a profile.")
.addSubcommand(modules.view.builder);
// Execute the command
export const execute = async (interaction: ChatInputCommandInteraction) => {
const { options } = interaction;
switch (options.getSubcommand()) {
case "view": {
await modules.view.execute(interaction);
break;
}
default: {
throw new Error("Could not find module for that command");
}
}
};

View file

@ -1,3 +0,0 @@
import view from "./view";
export default { view };

View file

@ -1,74 +0,0 @@
// Dependencies
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { CommandInteraction } from "discord.js";
// Configurations
// Models
// Function
export default {
metadata: { guildOnly: true, ephemeral: false },
builder: (command: SlashCommandSubcommandBuilder) => {
return command
.setName("view")
.setDescription("View a profile.")
.addUserOption((option) =>
option.setName("target").setDescription("The profile you wish to view")
);
},
execute: async (interaction: CommandInteraction) => {
// const { errorColor, footerText, footerIcon } = await getEmbedConfig(
// interaction.guild
// ); // Destructure
// const { client, options, user, guild } = interaction;
// // Target information
// const target = options?.getUser("target");
// // Discord User Information
// const discordUser = await client?.users?.fetch(
// `${target ? target?.id : user?.id}`
// );
// if (guild === null) {
// return logger?.silly(`Guild is null`);
// }
// // User Information
// const userObj = await fetchUser(discordUser, guild);
// const embed = new EmbedBuilder()
// .setAuthor({
// name: `${discordUser?.username}#${discordUser?.discriminator}`,
// iconURL: discordUser?.displayAvatarURL(),
// })
// .addFields(
// {
// name: `:dollar: Credits`,
// value: `${userObj?.credits || "Not found"}`,
// inline: true,
// },
// {
// name: `:squeeze_bottle: Level`,
// value: `${userObj?.level || "Not found"}`,
// inline: true,
// },
// {
// name: `:squeeze_bottle: Points`,
// value: `${userObj?.points || "Not found"}`,
// inline: true,
// },
// {
// name: `:loudspeaker: Reputation`,
// value: `${userObj?.reputation || "Not found"}`,
// inline: true,
// },
// {
// name: `:rainbow_flag: Language`,
// value: `${userObj?.language || "Not found"}`,
// inline: true,
// }
// )
// .setTimestamp()
// .setColor(errorColor)
// .setFooter({ text: footerText, iconURL: footerIcon });
// // Return interaction reply
// return interaction?.editReply({ embeds: [embed] });
},
};