From e67b30a015aed801aa95609158c2eca4aa36e433 Mon Sep 17 00:00:00 2001 From: Vermium Sifell Date: Wed, 13 Apr 2022 01:12:43 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20MessageEmbed=20instead=20of=20JS?= =?UTF-8?q?ON?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands/manage/index.ts | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/commands/manage/index.ts b/src/commands/manage/index.ts index 77cc4c3..18f5dac 100644 --- a/src/commands/manage/index.ts +++ b/src/commands/manage/index.ts @@ -1,6 +1,11 @@ //Dependencies import { SlashCommandBuilder } from "@discordjs/builders"; -import { CommandInteraction, ColorResolvable, Permissions } from "discord.js"; +import { + CommandInteraction, + ColorResolvable, + Permissions, + MessageEmbed, +} from "discord.js"; // Configurations import { colors, footer } from "../../../config.json"; @@ -23,20 +28,16 @@ export default { // Check permission if (!memberPermissions?.has(Permissions?.FLAGS?.MANAGE_GUILD)) { - // Embed object - const embed = { - title: ":toolbox: Admin" as string, - color: colors?.error as ColorResolvable, - description: "You do not have permission to manage this!" as string, - timestamp: new Date(), - footer: { - iconURL: footer?.icon as string, - text: footer?.text as string, - }, - }; - - // Return interaction reply - return interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ + embeds: [ + new MessageEmbed() + .setTitle("[:toolbox:] Manage") + .setDescription(`You do not have permission to manage this!`) + .setTimestamp(new Date()) + .setColor(colors?.error as ColorResolvable) + .setFooter({ text: footer?.text, iconURL: footer?.icon }), + ], + }); } if (options?.getSubcommandGroup() === "credits") {