diff --git a/src/commands/admin/counters/index.ts b/src/commands/admin/counters/index.ts index ea02b38..fe635db 100644 --- a/src/commands/admin/counters/index.ts +++ b/src/commands/admin/counters/index.ts @@ -16,13 +16,13 @@ export default async (interaction: CommandInteraction) => { // Module - Add if (options?.getSubcommand() === "add") { // Execute Module - Add - return await add(interaction); + return add(interaction); } // Module - Remove else if (options?.getSubcommand() === "remove") { // Execute Module - Remove - return await remove(interaction); + return remove(interaction); } // Log debug message diff --git a/src/commands/admin/counters/modules/add.ts b/src/commands/admin/counters/modules/add.ts index c19514f..fa557b0 100644 --- a/src/commands/admin/counters/modules/add.ts +++ b/src/commands/admin/counters/modules/add.ts @@ -25,12 +25,11 @@ export default async (interaction: CommandInteraction) => { const optionStart = options?.getNumber("start"); if (optionChannel?.type !== "GUILD_TEXT") { - // Embed object const embed = { title: ":toolbox: Admin - Counters [Add]" as string, description: "That channel is not supported, it needs to be a text channel." as string, - timestamp: new Date() as Date, + timestamp: new Date(), color: config?.colors?.error as ColorResolvable, footer: { iconURL: config?.footer?.icon as string, @@ -39,7 +38,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } const counterExist = await counterSchema?.findOne({ @@ -56,14 +55,12 @@ export default async (interaction: CommandInteraction) => { counter: optionStart || 0, }); - // Embed object const embed = { title: ":toolbox: Admin - Counters [Add]" as string, - description: - `${optionChannel} is now counting when hearing word ${optionWord} and it starts at number ${ - optionStart || 0 - }.` as string, - timestamp: new Date() as Date, + description: `${optionChannel} is now counting when hearing word ${optionWord} and it starts at number ${ + optionStart || 0 + }.`, + timestamp: new Date(), color: config?.colors?.success as ColorResolvable, footer: { iconURL: config?.footer?.icon as string, @@ -83,8 +80,8 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ":toolbox: Admin - Counters [Add]" as string, - description: `${optionChannel} is already a counting channel.` as string, - timestamp: new Date() as Date, + description: `${optionChannel} is already a counting channel.`, + timestamp: new Date(), color: config?.colors?.error as ColorResolvable, footer: { iconURL: config?.footer?.icon as string, diff --git a/src/commands/admin/counters/modules/remove.ts b/src/commands/admin/counters/modules/remove.ts index 9664b7c..d229b6e 100644 --- a/src/commands/admin/counters/modules/remove.ts +++ b/src/commands/admin/counters/modules/remove.ts @@ -27,9 +27,8 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ":toolbox: Admin - Counters [Remove]" as string, - description: - `${optionChannel} is no longer an counting channel.` as string, - timestamp: new Date() as Date, + description: `${optionChannel} is no longer an counting channel.`, + timestamp: new Date(), color: config?.colors?.success as ColorResolvable, footer: { iconURL: config?.footer?.icon as string, diff --git a/src/commands/admin/credits/index.ts b/src/commands/admin/credits/index.ts index e3a8c3d..1eddcde 100644 --- a/src/commands/admin/credits/index.ts +++ b/src/commands/admin/credits/index.ts @@ -10,29 +10,29 @@ import transfer from "./modules/transfer"; // Function export default async (interaction: CommandInteraction) => { // Destructure - const { user, guild, commandName, options } = interaction; + const { options } = interaction; // Module - Give if (options?.getSubcommand() === "give") { // Execute Module - Give - return await give(interaction); + return give(interaction); } // Module - Take else if (options?.getSubcommand() === "take") { // Execute Module - Take - return await take(interaction); + return take(interaction); } // Module - Set else if (options?.getSubcommand() === "set") { // Execute Module - Set - return await set(interaction); + return set(interaction); } // Module - Transfer else if (options?.getSubcommand() === "transfer") { // Execute Module - Transfer - return await transfer(interaction); + return transfer(interaction); } }; diff --git a/src/commands/admin/credits/modules/give.ts b/src/commands/admin/credits/modules/give.ts index 4be1936..caaa967 100644 --- a/src/commands/admin/credits/modules/give.ts +++ b/src/commands/admin/credits/modules/give.ts @@ -31,7 +31,7 @@ export default async (interaction: CommandInteraction) => { title: ":toolbox: Admin - Credits [Give]" as string, description: "We could not read your requested amount." as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -39,7 +39,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // If amount is zero or below @@ -49,7 +49,7 @@ export default async (interaction: CommandInteraction) => { title: ":toolbox: Admin - Credits [Give]" as string, description: "You can not give zero credits or below." as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -57,7 +57,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } if (optionUser === null) return; @@ -71,9 +71,9 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ":toolbox: Admin - Credits [Give]" as string, - description: `We could not find ${optionUser} in our database.` as string, + description: `We could not find ${optionUser} in our database.`, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -81,7 +81,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // If toUser.credits does not exist @@ -89,10 +89,9 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ":toolbox: Admin - Credits [Give]" as string, - description: - `We could not find credits for ${optionUser} in our database.` as string, + description: `We could not find credits for ${optionUser} in our database.`, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -100,7 +99,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // Deposit amount to toUser @@ -111,11 +110,9 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ":toolbox: Admin - Credits [Give]" as string, - description: `We have given ${optionUser}, ${creditNoun( - optionAmount - )}.` as string, + description: `We have given ${optionUser}, ${creditNoun(optionAmount)}.`, color: config?.colors?.success as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -130,6 +127,6 @@ export default async (interaction: CommandInteraction) => { ); // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); }); }; diff --git a/src/commands/admin/credits/modules/set.ts b/src/commands/admin/credits/modules/set.ts index f12ae53..2321680 100644 --- a/src/commands/admin/credits/modules/set.ts +++ b/src/commands/admin/credits/modules/set.ts @@ -1,5 +1,5 @@ // Dependencies -import { Permissions, CommandInteraction, ColorResolvable } from "discord.js"; +import { CommandInteraction, ColorResolvable } from "discord.js"; // Configurations import config from "../../../../../config.json"; @@ -31,7 +31,7 @@ export default async (interaction: CommandInteraction) => { title: ":toolbox: Admin - Credits [Set]" as string, description: "We could not read your requested amount." as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -39,7 +39,7 @@ export default async (interaction: CommandInteraction) => { }; // Send interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } if (optionUser === null) return; @@ -53,9 +53,9 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ":toolbox: Admin - Credits [Set]" as string, - description: `We could not find ${optionUser} in our database.` as string, + description: `We could not find ${optionUser} in our database.`, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -63,7 +63,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // If toUser.credits does not exist @@ -71,10 +71,9 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ":toolbox: Admin - Credits [Set]" as string, - description: - `We could not find credits for ${optionUser} in our database.` as string, + description: `We could not find credits for ${optionUser} in our database.`, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -82,7 +81,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // Set toUser with amount @@ -93,11 +92,9 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ":toolbox: Admin - Credits [Set]" as string, - description: `We have set ${optionUser} to ${creditNoun( - optionAmount - )}` as string, + description: `We have set ${optionUser} to ${creditNoun(optionAmount)}`, color: config?.colors?.success as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -112,6 +109,6 @@ export default async (interaction: CommandInteraction) => { ); // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); }); }; diff --git a/src/commands/admin/credits/modules/take.ts b/src/commands/admin/credits/modules/take.ts index 75321f1..08dae69 100644 --- a/src/commands/admin/credits/modules/take.ts +++ b/src/commands/admin/credits/modules/take.ts @@ -1,5 +1,5 @@ // Dependencies -import { Permissions, CommandInteraction, ColorResolvable } from "discord.js"; +import { CommandInteraction, ColorResolvable } from "discord.js"; // Configurations import config from "../../../../../config.json"; @@ -31,7 +31,7 @@ export default async (interaction: CommandInteraction) => { title: ":toolbox: Admin - Credits [Take]" as string, description: "We could not read your requested amount." as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -39,7 +39,7 @@ export default async (interaction: CommandInteraction) => { }; // Send interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // If amount is zero or below @@ -49,7 +49,7 @@ export default async (interaction: CommandInteraction) => { title: ":toolbox: Admin - Credits [Take]" as string, description: "You can not take zero credits or below." as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -57,7 +57,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } if (optionUser === null) return; @@ -71,9 +71,9 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ":toolbox: Admin - Credits [Take]" as string, - description: `We could not find ${optionUser} in our database.` as string, + description: `We could not find ${optionUser} in our database.`, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -81,7 +81,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // If toUser.credits does not exist @@ -89,10 +89,9 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ":toolbox: Admin - Credits [Take]" as string, - description: - `We could not find credits for ${optionUser} in our database.` as string, + description: `We could not find credits for ${optionUser} in our database.`, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -100,7 +99,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // Withdraw amount from toUser @@ -113,9 +112,9 @@ export default async (interaction: CommandInteraction) => { title: ":toolbox: Admin - Credits [Set]" as string, description: `We have taken ${creditNoun( optionAmount - )} from ${optionUser}` as string, + )} from ${optionUser}`, color: config?.colors?.success as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -130,6 +129,6 @@ export default async (interaction: CommandInteraction) => { ); // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); }); }; diff --git a/src/commands/admin/credits/modules/transfer.ts b/src/commands/admin/credits/modules/transfer.ts index d0f4488..e981b62 100644 --- a/src/commands/admin/credits/modules/transfer.ts +++ b/src/commands/admin/credits/modules/transfer.ts @@ -31,7 +31,7 @@ export default async (interaction: CommandInteraction) => { title: ":toolbox: Admin - Credits [Transfer]" as string, description: "We could not read your requested amount." as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -39,7 +39,7 @@ export default async (interaction: CommandInteraction) => { }; // Send interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } if (guild === null) return; @@ -57,10 +57,9 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ":toolbox: Admin - Credits [Transfer]" as string, - description: - `We could not find ${optionFromUser} in our database.` as string, + description: `We could not find ${optionFromUser} in our database.`, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -68,7 +67,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // If toUser.credits does not exist @@ -76,10 +75,9 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ":toolbox: Admin - Credits [Transfer]" as string, - description: - `We could not find credits for ${optionFromUser} in our database.` as string, + description: `We could not find credits for ${optionFromUser} in our database.`, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -87,7 +85,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // If toUser does not exist @@ -95,10 +93,9 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ":toolbox: Admin - Credits [Transfer]" as string, - description: - `We could not find ${optionToUser} in our database.` as string, + description: `We could not find ${optionToUser} in our database.`, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -106,7 +103,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // If toUser.credits does not exist @@ -114,10 +111,9 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ":toolbox: Admin - Credits [Transfer]" as string, - description: - `We could not find credits for ${optionToUser} in our database.` as string, + description: `We could not find credits for ${optionToUser} in our database.`, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -125,7 +121,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // Withdraw amount from fromUser @@ -141,7 +137,7 @@ export default async (interaction: CommandInteraction) => { title: ":toolbox: Admin - Credits [Transfer]" as string, description: `You sent ${creditNoun( optionAmount - )} from ${optionFromUser} to ${optionToUser}.` as string, + )} from ${optionFromUser} to ${optionToUser}.`, color: config?.colors?.success as ColorResolvable, fields: [ { @@ -155,7 +151,7 @@ export default async (interaction: CommandInteraction) => { inline: true, }, ], - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -170,6 +166,6 @@ export default async (interaction: CommandInteraction) => { ); // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); }); }; diff --git a/src/commands/admin/index.ts b/src/commands/admin/index.ts index ec80e42..8dd14fc 100644 --- a/src/commands/admin/index.ts +++ b/src/commands/admin/index.ts @@ -144,7 +144,7 @@ export default { title: ":toolbox: Admin" as string, color: config?.colors?.error as ColorResolvable, description: "You do not have permission to manage this!" as string, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -158,13 +158,13 @@ export default { // Group - Credits if (options?.getSubcommandGroup() === "credits") { // Execute Group - Credits - return await credits(interaction); + return credits(interaction); } // Group - Counters else if (options?.getSubcommandGroup() === "counters") { // Execute Group - Counters - return await counters(interaction); + return counters(interaction); } // Send debug message diff --git a/src/commands/counters/index.ts b/src/commands/counters/index.ts index e061089..3d3542e 100644 --- a/src/commands/counters/index.ts +++ b/src/commands/counters/index.ts @@ -30,7 +30,7 @@ export default { // Module - View if (options?.getSubcommand() === "view") { // Execute Module - View - return await view(interaction); + return view(interaction); } // Send debug message diff --git a/src/commands/counters/modules/view.ts b/src/commands/counters/modules/view.ts index 68e486e..75fa4c5 100644 --- a/src/commands/counters/modules/view.ts +++ b/src/commands/counters/modules/view.ts @@ -25,7 +25,7 @@ export default async (interaction: CommandInteraction) => { const embed = { title: ":1234: Counters [View]" as string, description: `${optionChannel} is not a counting channel.` as string, - timestamp: new Date() as Date, + timestamp: new Date(), color: config?.colors?.error as ColorResolvable, footer: { iconURL: config?.footer?.icon as string, @@ -34,7 +34,7 @@ export default async (interaction: CommandInteraction) => { }; // Send interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // Embed object @@ -42,7 +42,7 @@ export default async (interaction: CommandInteraction) => { title: ":1234: Counters [View]" as string, color: config.colors.success as ColorResolvable, description: `${optionChannel} is currently at number ${counter?.counter}.`, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -50,5 +50,5 @@ export default async (interaction: CommandInteraction) => { }; // Send interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); }; diff --git a/src/commands/credits/index.ts b/src/commands/credits/index.ts index b522c61..dca9c4d 100644 --- a/src/commands/credits/index.ts +++ b/src/commands/credits/index.ts @@ -59,25 +59,25 @@ export default { // Module - Balance if (options?.getSubcommand() === "balance") { // Execute Module - Balance - return await balance(interaction); + return balance(interaction); } // Module - Gift else if (options?.getSubcommand() === "gift") { // Execute Module - Gift - return await gift(interaction); + return gift(interaction); } // Module - Top else if (options?.getSubcommand() === "top") { // Execute Module - Top - return await top(interaction); + return top(interaction); } // Module - Work else if (options?.getSubcommand() === "work") { // Execute Module - Work - return await work(interaction); + return work(interaction); } // Send debug message diff --git a/src/commands/credits/modules/balance.ts b/src/commands/credits/modules/balance.ts index 8a8b6e9..ec1fc03 100644 --- a/src/commands/credits/modules/balance.ts +++ b/src/commands/credits/modules/balance.ts @@ -32,7 +32,7 @@ export default async (interaction: CommandInteraction) => { optionUser || "you" } in our database.` as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -52,7 +52,7 @@ export default async (interaction: CommandInteraction) => { optionUser || "you" } in our database.` as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -69,7 +69,7 @@ export default async (interaction: CommandInteraction) => { optionUser ? `${optionUser} has` : "You have" } ${creditNoun(userDB.credits)}.` as string, color: config?.colors?.success as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, diff --git a/src/commands/credits/modules/gift.ts b/src/commands/credits/modules/gift.ts index 9d6a93a..eea9201 100644 --- a/src/commands/credits/modules/gift.ts +++ b/src/commands/credits/modules/gift.ts @@ -47,7 +47,7 @@ export default async (interaction: CommandInteraction) => { title: ":dollar: Credits [Gift]" as string, description: "You can't pay yourself." as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -55,7 +55,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // If amount is null @@ -65,7 +65,7 @@ export default async (interaction: CommandInteraction) => { title: ":dollar: Credits [Gift]" as string, description: "We could not read your requested amount." as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -73,7 +73,7 @@ export default async (interaction: CommandInteraction) => { }; // Send interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // If amount is zero or below @@ -83,7 +83,7 @@ export default async (interaction: CommandInteraction) => { title: ":dollar: Credits [Gift]" as string, description: "You can't pay zero or below." as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -91,7 +91,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // If user has below gifting amount @@ -102,7 +102,7 @@ export default async (interaction: CommandInteraction) => { description: `You have insufficient credits. Your credits is ${fromUserDB?.credits}` as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -110,7 +110,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // If toUserDB has no credits @@ -121,7 +121,7 @@ export default async (interaction: CommandInteraction) => { description: `That user has no credits, I can not gift credits to ${optionUser}` as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -129,7 +129,7 @@ export default async (interaction: CommandInteraction) => { }; // Send interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // Withdraw amount from fromUserDB @@ -147,7 +147,7 @@ export default async (interaction: CommandInteraction) => { optionReason ? ` with reason: ${optionReason}` : "" }. Your new credits is ${creditNoun(fromUserDB?.credits)}.`, color: config?.colors?.success as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -161,7 +161,7 @@ export default async (interaction: CommandInteraction) => { optionReason ? ` with reason: ${optionReason}` : "" }. Your new credits is ${creditNoun(toUserDB?.credits)}.` as string, color: config?.colors?.success as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -180,7 +180,7 @@ export default async (interaction: CommandInteraction) => { ); // Send interaction reply - return await interaction.editReply({ + return interaction.editReply({ embeds: [interactionEmbed], }); }); diff --git a/src/commands/credits/modules/top.ts b/src/commands/credits/modules/top.ts index 7577f1f..3198484 100644 --- a/src/commands/credits/modules/top.ts +++ b/src/commands/credits/modules/top.ts @@ -35,7 +35,7 @@ export default async (interaction: CommandInteraction) => { ?.map((x, index) => entry(x, index)) ?.join("\n")}` as string, color: config?.colors?.success as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -43,5 +43,5 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); }; diff --git a/src/commands/credits/modules/work.ts b/src/commands/credits/modules/work.ts index 6b5030e..064b870 100644 --- a/src/commands/credits/modules/work.ts +++ b/src/commands/credits/modules/work.ts @@ -57,7 +57,7 @@ export default async (interaction: CommandInteraction) => { title: ":dollar: Credits [Work]" as string, description: `You have earned ${creditNoun(creditsEarned)}` as string, color: config?.colors?.success as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -65,7 +65,7 @@ export default async (interaction: CommandInteraction) => { }; // Send interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); }); // Create a timeout for the user @@ -97,7 +97,7 @@ export default async (interaction: CommandInteraction) => { description: `You have worked within the last ${ guildDB?.credits?.workTimeout / 1000 } seconds, you can not work now!` as string, - timestamp: new Date() as Date, + timestamp: new Date(), color: config?.colors?.error as ColorResolvable, footer: { iconURL: config?.footer?.icon as string, @@ -111,6 +111,6 @@ export default async (interaction: CommandInteraction) => { ); // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } }; diff --git a/src/commands/profile/index.ts b/src/commands/profile/index.ts index cf867e0..9747c66 100644 --- a/src/commands/profile/index.ts +++ b/src/commands/profile/index.ts @@ -30,7 +30,7 @@ export default { // Module - View if (options?.getSubcommand() === "view") { // Execute Module - View - return await view(interaction); + return view(interaction); } // Send debug message diff --git a/src/commands/profile/modules/view.ts b/src/commands/profile/modules/view.ts index 2a33560..16a3151 100644 --- a/src/commands/profile/modules/view.ts +++ b/src/commands/profile/modules/view.ts @@ -59,7 +59,7 @@ export default async (interaction: CommandInteraction) => { inline: true, }, ], - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -67,5 +67,5 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); }; diff --git a/src/commands/reputation/modules/give.ts b/src/commands/reputation/modules/give.ts index 5d4fb2b..21b816a 100644 --- a/src/commands/reputation/modules/give.ts +++ b/src/commands/reputation/modules/give.ts @@ -44,7 +44,7 @@ export default async (interaction: CommandInteraction) => { const embed = { title: ":loudspeaker: Reputation [Give]" as string, description: "You can not repute yourself." as string, - timestamp: new Date() as Date, + timestamp: new Date(), color: config?.colors?.error as ColorResolvable, footer: { iconURL: config?.footer?.icon as string, @@ -53,7 +53,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // If type is positive @@ -73,7 +73,7 @@ export default async (interaction: CommandInteraction) => { title: ":loudspeaker: Reputation [Give]" as string, description: `You have given ${optionTarget} a ${optionType} reputation!` as string, - timestamp: new Date() as Date, + timestamp: new Date(), color: config?.colors?.success as ColorResolvable, footer: { iconURL: config?.footer?.icon as string, @@ -93,7 +93,7 @@ export default async (interaction: CommandInteraction) => { timeoutId: "2022-04-10-16-42", }); // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); }); setTimeout(async () => { @@ -118,7 +118,7 @@ export default async (interaction: CommandInteraction) => { description: `You have given reputation within the last ${ config?.reputation?.timeout / 1000 } seconds, you can not repute now!` as string, - timestamp: new Date() as Date, + timestamp: new Date(), color: config.colors.error as ColorResolvable, footer: { iconURL: config?.footer?.icon as string, @@ -134,6 +134,6 @@ export default async (interaction: CommandInteraction) => { ); // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } }; diff --git a/src/commands/settings/guild/addons/credits.ts b/src/commands/settings/guild/addons/credits.ts index 411ed20..e1aab4f 100644 --- a/src/commands/settings/guild/addons/credits.ts +++ b/src/commands/settings/guild/addons/credits.ts @@ -79,7 +79,7 @@ export default async (interaction: CommandInteraction) => { inline: true, }, ], - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -92,6 +92,6 @@ export default async (interaction: CommandInteraction) => { ); // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); }); }; diff --git a/src/commands/settings/guild/addons/points.ts b/src/commands/settings/guild/addons/points.ts index 9113d4b..97dbb0f 100644 --- a/src/commands/settings/guild/addons/points.ts +++ b/src/commands/settings/guild/addons/points.ts @@ -63,7 +63,7 @@ export default async (interaction: CommandInteraction) => { inline: true, }, ], - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -76,6 +76,6 @@ export default async (interaction: CommandInteraction) => { ); // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); }); }; diff --git a/src/commands/settings/guild/addons/pterodactyl.ts b/src/commands/settings/guild/addons/pterodactyl.ts index 7bbae1a..94d39fa 100644 --- a/src/commands/settings/guild/addons/pterodactyl.ts +++ b/src/commands/settings/guild/addons/pterodactyl.ts @@ -32,7 +32,7 @@ export default async (interaction: CommandInteraction) => { title: ":hammer: Settings - Guild [Pterodactyl]" as string, color: config?.colors?.success as ColorResolvable, description: "Pterodactyl settings is saved!" as string, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -45,6 +45,6 @@ export default async (interaction: CommandInteraction) => { ); // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); }); }; diff --git a/src/commands/settings/guild/index.ts b/src/commands/settings/guild/index.ts index f03cde3..fcfa173 100644 --- a/src/commands/settings/guild/index.ts +++ b/src/commands/settings/guild/index.ts @@ -24,7 +24,7 @@ export default async (interaction: CommandInteraction) => { title: ":tools: Settings - Guild" as string, color: config?.colors?.error as ColorResolvable, description: "You do not have permission to manage this!" as string, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -32,25 +32,25 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } // Module - Pterodactyl if (options?.getSubcommand() === "pterodactyl") { // Execute Module - Pterodactyl - return await pterodactyl(interaction); + return pterodactyl(interaction); } // Module - Credits else if (options?.getSubcommand() === "credits") { // Execute Module - Credits - return await credits(interaction); + return credits(interaction); } // Module - Points else if (options?.getSubcommand() === "points") { // Execute Module - Points - return await points(interaction); + return points(interaction); } // Send debug message diff --git a/src/commands/settings/user/modules/appearance.ts b/src/commands/settings/user/modules/appearance.ts index 053c4dc..17ecb8a 100644 --- a/src/commands/settings/user/modules/appearance.ts +++ b/src/commands/settings/user/modules/appearance.ts @@ -42,7 +42,7 @@ export default async (interaction: CommandInteraction) => { inline: true, }, ], - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -55,6 +55,6 @@ export default async (interaction: CommandInteraction) => { ); // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); }); }; diff --git a/src/commands/shop/index.ts b/src/commands/shop/index.ts index 47bad3a..621d5cc 100644 --- a/src/commands/shop/index.ts +++ b/src/commands/shop/index.ts @@ -58,13 +58,13 @@ export default { // Module - Pterodactyl if (options?.getSubcommand() === "pterodactyl") { // Execute Module - Pterodactyl - return await pterodactyl(interaction); + return pterodactyl(interaction); } // Group - Roles else if (options?.getSubcommandGroup() === "roles") { // Execute Group - Roles - return await roles(interaction); + return roles(interaction); } // Send debug message diff --git a/src/commands/shop/modules/pterodactyl.ts b/src/commands/shop/modules/pterodactyl.ts index 197a240..8af6011 100644 --- a/src/commands/shop/modules/pterodactyl.ts +++ b/src/commands/shop/modules/pterodactyl.ts @@ -30,7 +30,7 @@ export default async (interaction: CommandInteraction) => { title: ":dollar: Credits [Gift]" as string, description: "We could not read your requested amount." as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -38,7 +38,7 @@ export default async (interaction: CommandInteraction) => { }; // Send interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } if (guild === null) return; @@ -64,7 +64,7 @@ export default async (interaction: CommandInteraction) => { value: `${creditNoun(userDB?.credits)}` as string, }, ], - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -86,7 +86,7 @@ export default async (interaction: CommandInteraction) => { value: `${creditNoun(userDB?.credits)}` as string, }, ], - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -107,7 +107,7 @@ export default async (interaction: CommandInteraction) => { value: `${creditNoun(userDB?.credits)}` as string, }, ], - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -159,7 +159,7 @@ export default async (interaction: CommandInteraction) => { }, ], color: config?.colors?.success as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -171,7 +171,7 @@ export default async (interaction: CommandInteraction) => { title: ":shopping_cart: Shop [Pterodactyl]" as string, description: "I have sent you the code in DM!" as string, color: config?.colors?.success as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -208,7 +208,7 @@ export default async (interaction: CommandInteraction) => { description: "Something went wrong, please try again later." as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -225,7 +225,7 @@ export default async (interaction: CommandInteraction) => { title: ":shopping_cart: Shop [Pterodactyl]" as string, description: "Something went wrong, please try again later." as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, diff --git a/src/commands/shop/roles/modules/buy.ts b/src/commands/shop/roles/modules/buy.ts index 079402b..533e68d 100644 --- a/src/commands/shop/roles/modules/buy.ts +++ b/src/commands/shop/roles/modules/buy.ts @@ -29,7 +29,7 @@ export default async (interaction: CommandInteraction) => { title: ":dollar: Shop - Roles [Buy]" as string, description: "We could not read your requested name." as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -37,7 +37,7 @@ export default async (interaction: CommandInteraction) => { }; // Send interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } await guild?.roles @@ -84,7 +84,7 @@ export default async (interaction: CommandInteraction) => { value: `${creditNoun(userDB?.credits)}` as string, }, ], - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, diff --git a/src/commands/shop/roles/modules/cancel.ts b/src/commands/shop/roles/modules/cancel.ts index 3572c30..66a0507 100644 --- a/src/commands/shop/roles/modules/cancel.ts +++ b/src/commands/shop/roles/modules/cancel.ts @@ -28,7 +28,7 @@ export default async (interaction: CommandInteraction) => { title: ":dollar: Shop - Roles [Cancel]" as string, description: "We could not read your requested role." as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -36,7 +36,7 @@ export default async (interaction: CommandInteraction) => { }; // Send interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } const roleExist = await shopRolesSchema?.find({ @@ -71,7 +71,7 @@ export default async (interaction: CommandInteraction) => { value: `${creditNoun(userDB?.credits)}` as string, }, ], - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, diff --git a/src/commands/utilities/index.ts b/src/commands/utilities/index.ts index 4170650..9e009a3 100644 --- a/src/commands/utilities/index.ts +++ b/src/commands/utilities/index.ts @@ -41,17 +41,17 @@ export default { // Module - Lookup if (options?.getSubcommand() === "lookup") { // Execute Module - Lookup - return await lookup(interaction); + return lookup(interaction); } // Module - About else if (options?.getSubcommand() === "about") { // Execute Module - About - return await about(interaction); + return about(interaction); } // Module - Stats else if (options?.getSubcommand() === "stats") { // Execute Module - Stats - return await stats(interaction); + return stats(interaction); } // Send debug message diff --git a/src/commands/utilities/modules/about.ts b/src/commands/utilities/modules/about.ts index 40f4e9b..e76779e 100644 --- a/src/commands/utilities/modules/about.ts +++ b/src/commands/utilities/modules/about.ts @@ -16,7 +16,7 @@ export default async (interaction: CommandInteraction) => { If you are interested in contributing, then just [fork it](https://github.com/ZynerOrg/xyter) yourself, we :heart: Open Source.` as string, color: config?.colors?.success as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, diff --git a/src/commands/utilities/modules/lookup.ts b/src/commands/utilities/modules/lookup.ts index 0a12893..b997eb4 100644 --- a/src/commands/utilities/modules/lookup.ts +++ b/src/commands/utilities/modules/lookup.ts @@ -28,7 +28,7 @@ export default async (interaction: CommandInteraction) => { title: ":hammer: Utilities - Lookup" as string, description: `${res?.data?.message}: ${res?.data?.query}` as string, color: config?.colors?.error as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, @@ -95,7 +95,7 @@ export default async (interaction: CommandInteraction) => { }, ], color: config?.colors?.success as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string, diff --git a/src/commands/utilities/modules/stats.ts b/src/commands/utilities/modules/stats.ts index bba06ba..9463d71 100644 --- a/src/commands/utilities/modules/stats.ts +++ b/src/commands/utilities/modules/stats.ts @@ -48,7 +48,7 @@ export default async (interaction: CommandInteraction) => { }, ], color: config?.colors?.success as ColorResolvable, - timestamp: new Date() as Date, + timestamp: new Date(), footer: { iconURL: config?.footer?.icon as string, text: config?.footer?.text as string,