Merge pull request #202 from VermiumSifell/201-fix-code-smells
Fixed code smells
This commit is contained in:
commit
240ecf025f
32 changed files with 153 additions and 168 deletions
|
@ -16,13 +16,13 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Module - Add
|
// Module - Add
|
||||||
if (options?.getSubcommand() === "add") {
|
if (options?.getSubcommand() === "add") {
|
||||||
// Execute Module - Add
|
// Execute Module - Add
|
||||||
return await add(interaction);
|
return add(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module - Remove
|
// Module - Remove
|
||||||
else if (options?.getSubcommand() === "remove") {
|
else if (options?.getSubcommand() === "remove") {
|
||||||
// Execute Module - Remove
|
// Execute Module - Remove
|
||||||
return await remove(interaction);
|
return remove(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Log debug message
|
// Log debug message
|
||||||
|
|
|
@ -25,12 +25,11 @@ export default async (interaction: CommandInteraction) => {
|
||||||
const optionStart = options?.getNumber("start");
|
const optionStart = options?.getNumber("start");
|
||||||
|
|
||||||
if (optionChannel?.type !== "GUILD_TEXT") {
|
if (optionChannel?.type !== "GUILD_TEXT") {
|
||||||
// Embed object
|
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Counters [Add]" as string,
|
title: ":toolbox: Admin - Counters [Add]" as string,
|
||||||
description:
|
description:
|
||||||
"That channel is not supported, it needs to be a text channel." as string,
|
"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,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
|
@ -39,7 +38,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
const counterExist = await counterSchema?.findOne({
|
const counterExist = await counterSchema?.findOne({
|
||||||
|
@ -56,14 +55,12 @@ export default async (interaction: CommandInteraction) => {
|
||||||
counter: optionStart || 0,
|
counter: optionStart || 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Embed object
|
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Counters [Add]" as string,
|
title: ":toolbox: Admin - Counters [Add]" as string,
|
||||||
description:
|
description: `${optionChannel} is now counting when hearing word ${optionWord} and it starts at number ${
|
||||||
`${optionChannel} is now counting when hearing word ${optionWord} and it starts at number ${
|
|
||||||
optionStart || 0
|
optionStart || 0
|
||||||
}.` as string,
|
}.`,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
|
@ -83,8 +80,8 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Embed object
|
// Embed object
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Counters [Add]" as string,
|
title: ":toolbox: Admin - Counters [Add]" as string,
|
||||||
description: `${optionChannel} is already a counting channel.` as string,
|
description: `${optionChannel} is already a counting channel.`,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
|
|
|
@ -27,9 +27,8 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Embed object
|
// Embed object
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Counters [Remove]" as string,
|
title: ":toolbox: Admin - Counters [Remove]" as string,
|
||||||
description:
|
description: `${optionChannel} is no longer an counting channel.`,
|
||||||
`${optionChannel} is no longer an counting channel.` as string,
|
timestamp: new Date(),
|
||||||
timestamp: new Date() as Date,
|
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
|
|
|
@ -10,29 +10,29 @@ import transfer from "./modules/transfer";
|
||||||
// Function
|
// Function
|
||||||
export default async (interaction: CommandInteraction) => {
|
export default async (interaction: CommandInteraction) => {
|
||||||
// Destructure
|
// Destructure
|
||||||
const { user, guild, commandName, options } = interaction;
|
const { options } = interaction;
|
||||||
|
|
||||||
// Module - Give
|
// Module - Give
|
||||||
if (options?.getSubcommand() === "give") {
|
if (options?.getSubcommand() === "give") {
|
||||||
// Execute Module - Give
|
// Execute Module - Give
|
||||||
return await give(interaction);
|
return give(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module - Take
|
// Module - Take
|
||||||
else if (options?.getSubcommand() === "take") {
|
else if (options?.getSubcommand() === "take") {
|
||||||
// Execute Module - Take
|
// Execute Module - Take
|
||||||
return await take(interaction);
|
return take(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module - Set
|
// Module - Set
|
||||||
else if (options?.getSubcommand() === "set") {
|
else if (options?.getSubcommand() === "set") {
|
||||||
// Execute Module - Set
|
// Execute Module - Set
|
||||||
return await set(interaction);
|
return set(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module - Transfer
|
// Module - Transfer
|
||||||
else if (options?.getSubcommand() === "transfer") {
|
else if (options?.getSubcommand() === "transfer") {
|
||||||
// Execute Module - Transfer
|
// Execute Module - Transfer
|
||||||
return await transfer(interaction);
|
return transfer(interaction);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,7 +31,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":toolbox: Admin - Credits [Give]" as string,
|
title: ":toolbox: Admin - Credits [Give]" as string,
|
||||||
description: "We could not read your requested amount." as string,
|
description: "We could not read your requested amount." as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -39,7 +39,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// If amount is zero or below
|
// If amount is zero or below
|
||||||
|
@ -49,7 +49,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":toolbox: Admin - Credits [Give]" as string,
|
title: ":toolbox: Admin - Credits [Give]" as string,
|
||||||
description: "You can not give zero credits or below." as string,
|
description: "You can not give zero credits or below." as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -57,7 +57,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optionUser === null) return;
|
if (optionUser === null) return;
|
||||||
|
@ -71,9 +71,9 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Embed object
|
// Embed object
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Credits [Give]" as string,
|
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,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -81,7 +81,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// If toUser.credits does not exist
|
// If toUser.credits does not exist
|
||||||
|
@ -89,10 +89,9 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Embed object
|
// Embed object
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Credits [Give]" as string,
|
title: ":toolbox: Admin - Credits [Give]" as string,
|
||||||
description:
|
description: `We could not find credits for ${optionUser} in our database.`,
|
||||||
`We could not find credits for ${optionUser} in our database.` as string,
|
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -100,7 +99,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deposit amount to toUser
|
// Deposit amount to toUser
|
||||||
|
@ -111,11 +110,9 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Embed object
|
// Embed object
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Credits [Give]" as string,
|
title: ":toolbox: Admin - Credits [Give]" as string,
|
||||||
description: `We have given ${optionUser}, ${creditNoun(
|
description: `We have given ${optionUser}, ${creditNoun(optionAmount)}.`,
|
||||||
optionAmount
|
|
||||||
)}.` as string,
|
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -130,6 +127,6 @@ export default async (interaction: CommandInteraction) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Dependencies
|
// Dependencies
|
||||||
import { Permissions, CommandInteraction, ColorResolvable } from "discord.js";
|
import { CommandInteraction, ColorResolvable } from "discord.js";
|
||||||
|
|
||||||
// Configurations
|
// Configurations
|
||||||
import config from "../../../../../config.json";
|
import config from "../../../../../config.json";
|
||||||
|
@ -31,7 +31,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":toolbox: Admin - Credits [Set]" as string,
|
title: ":toolbox: Admin - Credits [Set]" as string,
|
||||||
description: "We could not read your requested amount." as string,
|
description: "We could not read your requested amount." as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -39,7 +39,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Send interaction reply
|
// Send interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optionUser === null) return;
|
if (optionUser === null) return;
|
||||||
|
@ -53,9 +53,9 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Embed object
|
// Embed object
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Credits [Set]" as string,
|
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,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -63,7 +63,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// If toUser.credits does not exist
|
// If toUser.credits does not exist
|
||||||
|
@ -71,10 +71,9 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Embed object
|
// Embed object
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Credits [Set]" as string,
|
title: ":toolbox: Admin - Credits [Set]" as string,
|
||||||
description:
|
description: `We could not find credits for ${optionUser} in our database.`,
|
||||||
`We could not find credits for ${optionUser} in our database.` as string,
|
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -82,7 +81,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set toUser with amount
|
// Set toUser with amount
|
||||||
|
@ -93,11 +92,9 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Embed object
|
// Embed object
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Credits [Set]" as string,
|
title: ":toolbox: Admin - Credits [Set]" as string,
|
||||||
description: `We have set ${optionUser} to ${creditNoun(
|
description: `We have set ${optionUser} to ${creditNoun(optionAmount)}`,
|
||||||
optionAmount
|
|
||||||
)}` as string,
|
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -112,6 +109,6 @@ export default async (interaction: CommandInteraction) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Dependencies
|
// Dependencies
|
||||||
import { Permissions, CommandInteraction, ColorResolvable } from "discord.js";
|
import { CommandInteraction, ColorResolvable } from "discord.js";
|
||||||
|
|
||||||
// Configurations
|
// Configurations
|
||||||
import config from "../../../../../config.json";
|
import config from "../../../../../config.json";
|
||||||
|
@ -31,7 +31,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":toolbox: Admin - Credits [Take]" as string,
|
title: ":toolbox: Admin - Credits [Take]" as string,
|
||||||
description: "We could not read your requested amount." as string,
|
description: "We could not read your requested amount." as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -39,7 +39,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Send interaction reply
|
// Send interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// If amount is zero or below
|
// If amount is zero or below
|
||||||
|
@ -49,7 +49,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":toolbox: Admin - Credits [Take]" as string,
|
title: ":toolbox: Admin - Credits [Take]" as string,
|
||||||
description: "You can not take zero credits or below." as string,
|
description: "You can not take zero credits or below." as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -57,7 +57,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optionUser === null) return;
|
if (optionUser === null) return;
|
||||||
|
@ -71,9 +71,9 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Embed object
|
// Embed object
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Credits [Take]" as string,
|
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,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -81,7 +81,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// If toUser.credits does not exist
|
// If toUser.credits does not exist
|
||||||
|
@ -89,10 +89,9 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Embed object
|
// Embed object
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Credits [Take]" as string,
|
title: ":toolbox: Admin - Credits [Take]" as string,
|
||||||
description:
|
description: `We could not find credits for ${optionUser} in our database.`,
|
||||||
`We could not find credits for ${optionUser} in our database.` as string,
|
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -100,7 +99,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Withdraw amount from toUser
|
// Withdraw amount from toUser
|
||||||
|
@ -113,9 +112,9 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":toolbox: Admin - Credits [Set]" as string,
|
title: ":toolbox: Admin - Credits [Set]" as string,
|
||||||
description: `We have taken ${creditNoun(
|
description: `We have taken ${creditNoun(
|
||||||
optionAmount
|
optionAmount
|
||||||
)} from ${optionUser}` as string,
|
)} from ${optionUser}`,
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -130,6 +129,6 @@ export default async (interaction: CommandInteraction) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,7 +31,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":toolbox: Admin - Credits [Transfer]" as string,
|
title: ":toolbox: Admin - Credits [Transfer]" as string,
|
||||||
description: "We could not read your requested amount." as string,
|
description: "We could not read your requested amount." as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -39,7 +39,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Send interaction reply
|
// Send interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (guild === null) return;
|
if (guild === null) return;
|
||||||
|
@ -57,10 +57,9 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Embed object
|
// Embed object
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Credits [Transfer]" as string,
|
title: ":toolbox: Admin - Credits [Transfer]" as string,
|
||||||
description:
|
description: `We could not find ${optionFromUser} in our database.`,
|
||||||
`We could not find ${optionFromUser} in our database.` as string,
|
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -68,7 +67,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// If toUser.credits does not exist
|
// If toUser.credits does not exist
|
||||||
|
@ -76,10 +75,9 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Embed object
|
// Embed object
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Credits [Transfer]" as string,
|
title: ":toolbox: Admin - Credits [Transfer]" as string,
|
||||||
description:
|
description: `We could not find credits for ${optionFromUser} in our database.`,
|
||||||
`We could not find credits for ${optionFromUser} in our database.` as string,
|
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -87,7 +85,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// If toUser does not exist
|
// If toUser does not exist
|
||||||
|
@ -95,10 +93,9 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Embed object
|
// Embed object
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Credits [Transfer]" as string,
|
title: ":toolbox: Admin - Credits [Transfer]" as string,
|
||||||
description:
|
description: `We could not find ${optionToUser} in our database.`,
|
||||||
`We could not find ${optionToUser} in our database.` as string,
|
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -106,7 +103,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// If toUser.credits does not exist
|
// If toUser.credits does not exist
|
||||||
|
@ -114,10 +111,9 @@ export default async (interaction: CommandInteraction) => {
|
||||||
// Embed object
|
// Embed object
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":toolbox: Admin - Credits [Transfer]" as string,
|
title: ":toolbox: Admin - Credits [Transfer]" as string,
|
||||||
description:
|
description: `We could not find credits for ${optionToUser} in our database.`,
|
||||||
`We could not find credits for ${optionToUser} in our database.` as string,
|
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -125,7 +121,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Withdraw amount from fromUser
|
// Withdraw amount from fromUser
|
||||||
|
@ -141,7 +137,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":toolbox: Admin - Credits [Transfer]" as string,
|
title: ":toolbox: Admin - Credits [Transfer]" as string,
|
||||||
description: `You sent ${creditNoun(
|
description: `You sent ${creditNoun(
|
||||||
optionAmount
|
optionAmount
|
||||||
)} from ${optionFromUser} to ${optionToUser}.` as string,
|
)} from ${optionFromUser} to ${optionToUser}.`,
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
|
@ -155,7 +151,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
inline: true,
|
inline: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -170,6 +166,6 @@ export default async (interaction: CommandInteraction) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -144,7 +144,7 @@ export default {
|
||||||
title: ":toolbox: Admin" as string,
|
title: ":toolbox: Admin" as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
description: "You do not have permission to manage this!" as string,
|
description: "You do not have permission to manage this!" as string,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -158,13 +158,13 @@ export default {
|
||||||
// Group - Credits
|
// Group - Credits
|
||||||
if (options?.getSubcommandGroup() === "credits") {
|
if (options?.getSubcommandGroup() === "credits") {
|
||||||
// Execute Group - Credits
|
// Execute Group - Credits
|
||||||
return await credits(interaction);
|
return credits(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Group - Counters
|
// Group - Counters
|
||||||
else if (options?.getSubcommandGroup() === "counters") {
|
else if (options?.getSubcommandGroup() === "counters") {
|
||||||
// Execute Group - Counters
|
// Execute Group - Counters
|
||||||
return await counters(interaction);
|
return counters(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send debug message
|
// Send debug message
|
||||||
|
|
|
@ -30,7 +30,7 @@ export default {
|
||||||
// Module - View
|
// Module - View
|
||||||
if (options?.getSubcommand() === "view") {
|
if (options?.getSubcommand() === "view") {
|
||||||
// Execute Module - View
|
// Execute Module - View
|
||||||
return await view(interaction);
|
return view(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send debug message
|
// Send debug message
|
||||||
|
|
|
@ -25,7 +25,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":1234: Counters [View]" as string,
|
title: ":1234: Counters [View]" as string,
|
||||||
description: `${optionChannel} is not a counting channel.` 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,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
|
@ -34,7 +34,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Send interaction reply
|
// Send interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Embed object
|
// Embed object
|
||||||
|
@ -42,7 +42,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":1234: Counters [View]" as string,
|
title: ":1234: Counters [View]" as string,
|
||||||
color: config.colors.success as ColorResolvable,
|
color: config.colors.success as ColorResolvable,
|
||||||
description: `${optionChannel} is currently at number ${counter?.counter}.`,
|
description: `${optionChannel} is currently at number ${counter?.counter}.`,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -50,5 +50,5 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Send interaction reply
|
// Send interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
};
|
};
|
||||||
|
|
|
@ -59,25 +59,25 @@ export default {
|
||||||
// Module - Balance
|
// Module - Balance
|
||||||
if (options?.getSubcommand() === "balance") {
|
if (options?.getSubcommand() === "balance") {
|
||||||
// Execute Module - Balance
|
// Execute Module - Balance
|
||||||
return await balance(interaction);
|
return balance(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module - Gift
|
// Module - Gift
|
||||||
else if (options?.getSubcommand() === "gift") {
|
else if (options?.getSubcommand() === "gift") {
|
||||||
// Execute Module - Gift
|
// Execute Module - Gift
|
||||||
return await gift(interaction);
|
return gift(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module - Top
|
// Module - Top
|
||||||
else if (options?.getSubcommand() === "top") {
|
else if (options?.getSubcommand() === "top") {
|
||||||
// Execute Module - Top
|
// Execute Module - Top
|
||||||
return await top(interaction);
|
return top(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module - Work
|
// Module - Work
|
||||||
else if (options?.getSubcommand() === "work") {
|
else if (options?.getSubcommand() === "work") {
|
||||||
// Execute Module - Work
|
// Execute Module - Work
|
||||||
return await work(interaction);
|
return work(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send debug message
|
// Send debug message
|
||||||
|
|
|
@ -32,7 +32,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
optionUser || "you"
|
optionUser || "you"
|
||||||
} in our database.` as string,
|
} in our database.` as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -52,7 +52,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
optionUser || "you"
|
optionUser || "you"
|
||||||
} in our database.` as string,
|
} in our database.` as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -69,7 +69,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
optionUser ? `${optionUser} has` : "You have"
|
optionUser ? `${optionUser} has` : "You have"
|
||||||
} ${creditNoun(userDB.credits)}.` as string,
|
} ${creditNoun(userDB.credits)}.` as string,
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
|
|
@ -47,7 +47,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":dollar: Credits [Gift]" as string,
|
title: ":dollar: Credits [Gift]" as string,
|
||||||
description: "You can't pay yourself." as string,
|
description: "You can't pay yourself." as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -55,7 +55,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// If amount is null
|
// If amount is null
|
||||||
|
@ -65,7 +65,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":dollar: Credits [Gift]" as string,
|
title: ":dollar: Credits [Gift]" as string,
|
||||||
description: "We could not read your requested amount." as string,
|
description: "We could not read your requested amount." as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -73,7 +73,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Send interaction reply
|
// Send interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// If amount is zero or below
|
// If amount is zero or below
|
||||||
|
@ -83,7 +83,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":dollar: Credits [Gift]" as string,
|
title: ":dollar: Credits [Gift]" as string,
|
||||||
description: "You can't pay zero or below." as string,
|
description: "You can't pay zero or below." as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -91,7 +91,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// If user has below gifting amount
|
// If user has below gifting amount
|
||||||
|
@ -102,7 +102,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
description:
|
description:
|
||||||
`You have insufficient credits. Your credits is ${fromUserDB?.credits}` as string,
|
`You have insufficient credits. Your credits is ${fromUserDB?.credits}` as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -110,7 +110,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// If toUserDB has no credits
|
// If toUserDB has no credits
|
||||||
|
@ -121,7 +121,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
description:
|
description:
|
||||||
`That user has no credits, I can not gift credits to ${optionUser}` as string,
|
`That user has no credits, I can not gift credits to ${optionUser}` as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -129,7 +129,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Send interaction reply
|
// Send interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Withdraw amount from fromUserDB
|
// Withdraw amount from fromUserDB
|
||||||
|
@ -147,7 +147,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
optionReason ? ` with reason: ${optionReason}` : ""
|
optionReason ? ` with reason: ${optionReason}` : ""
|
||||||
}. Your new credits is ${creditNoun(fromUserDB?.credits)}.`,
|
}. Your new credits is ${creditNoun(fromUserDB?.credits)}.`,
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -161,7 +161,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
optionReason ? ` with reason: ${optionReason}` : ""
|
optionReason ? ` with reason: ${optionReason}` : ""
|
||||||
}. Your new credits is ${creditNoun(toUserDB?.credits)}.` as string,
|
}. Your new credits is ${creditNoun(toUserDB?.credits)}.` as string,
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -180,7 +180,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Send interaction reply
|
// Send interaction reply
|
||||||
return await interaction.editReply({
|
return interaction.editReply({
|
||||||
embeds: [interactionEmbed],
|
embeds: [interactionEmbed],
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -35,7 +35,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
?.map((x, index) => entry(x, index))
|
?.map((x, index) => entry(x, index))
|
||||||
?.join("\n")}` as string,
|
?.join("\n")}` as string,
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -43,5 +43,5 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
};
|
};
|
||||||
|
|
|
@ -57,7 +57,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":dollar: Credits [Work]" as string,
|
title: ":dollar: Credits [Work]" as string,
|
||||||
description: `You have earned ${creditNoun(creditsEarned)}` as string,
|
description: `You have earned ${creditNoun(creditsEarned)}` as string,
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -65,7 +65,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Send interaction reply
|
// Send interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create a timeout for the user
|
// Create a timeout for the user
|
||||||
|
@ -97,7 +97,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
description: `You have worked within the last ${
|
description: `You have worked within the last ${
|
||||||
guildDB?.credits?.workTimeout / 1000
|
guildDB?.credits?.workTimeout / 1000
|
||||||
} seconds, you can not work now!` as string,
|
} seconds, you can not work now!` as string,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
|
@ -111,6 +111,6 @@ export default async (interaction: CommandInteraction) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,7 +30,7 @@ export default {
|
||||||
// Module - View
|
// Module - View
|
||||||
if (options?.getSubcommand() === "view") {
|
if (options?.getSubcommand() === "view") {
|
||||||
// Execute Module - View
|
// Execute Module - View
|
||||||
return await view(interaction);
|
return view(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send debug message
|
// Send debug message
|
||||||
|
|
|
@ -59,7 +59,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
inline: true,
|
inline: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -67,5 +67,5 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
};
|
};
|
||||||
|
|
|
@ -44,7 +44,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
const embed = {
|
const embed = {
|
||||||
title: ":loudspeaker: Reputation [Give]" as string,
|
title: ":loudspeaker: Reputation [Give]" as string,
|
||||||
description: "You can not repute yourself." as string,
|
description: "You can not repute yourself." as string,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
|
@ -53,7 +53,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// If type is positive
|
// If type is positive
|
||||||
|
@ -73,7 +73,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":loudspeaker: Reputation [Give]" as string,
|
title: ":loudspeaker: Reputation [Give]" as string,
|
||||||
description:
|
description:
|
||||||
`You have given ${optionTarget} a ${optionType} reputation!` as string,
|
`You have given ${optionTarget} a ${optionType} reputation!` as string,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
|
@ -93,7 +93,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
timeoutId: "2022-04-10-16-42",
|
timeoutId: "2022-04-10-16-42",
|
||||||
});
|
});
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
});
|
});
|
||||||
|
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
|
@ -118,7 +118,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
description: `You have given reputation within the last ${
|
description: `You have given reputation within the last ${
|
||||||
config?.reputation?.timeout / 1000
|
config?.reputation?.timeout / 1000
|
||||||
} seconds, you can not repute now!` as string,
|
} seconds, you can not repute now!` as string,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
color: config.colors.error as ColorResolvable,
|
color: config.colors.error as ColorResolvable,
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
|
@ -134,6 +134,6 @@ export default async (interaction: CommandInteraction) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -79,7 +79,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
inline: true,
|
inline: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -92,6 +92,6 @@ export default async (interaction: CommandInteraction) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -63,7 +63,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
inline: true,
|
inline: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -76,6 +76,6 @@ export default async (interaction: CommandInteraction) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -32,7 +32,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":hammer: Settings - Guild [Pterodactyl]" as string,
|
title: ":hammer: Settings - Guild [Pterodactyl]" as string,
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
description: "Pterodactyl settings is saved!" as string,
|
description: "Pterodactyl settings is saved!" as string,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -45,6 +45,6 @@ export default async (interaction: CommandInteraction) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,7 +24,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":tools: Settings - Guild" as string,
|
title: ":tools: Settings - Guild" as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
description: "You do not have permission to manage this!" as string,
|
description: "You do not have permission to manage this!" as string,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -32,25 +32,25 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module - Pterodactyl
|
// Module - Pterodactyl
|
||||||
if (options?.getSubcommand() === "pterodactyl") {
|
if (options?.getSubcommand() === "pterodactyl") {
|
||||||
// Execute Module - Pterodactyl
|
// Execute Module - Pterodactyl
|
||||||
return await pterodactyl(interaction);
|
return pterodactyl(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module - Credits
|
// Module - Credits
|
||||||
else if (options?.getSubcommand() === "credits") {
|
else if (options?.getSubcommand() === "credits") {
|
||||||
// Execute Module - Credits
|
// Execute Module - Credits
|
||||||
return await credits(interaction);
|
return credits(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module - Points
|
// Module - Points
|
||||||
else if (options?.getSubcommand() === "points") {
|
else if (options?.getSubcommand() === "points") {
|
||||||
// Execute Module - Points
|
// Execute Module - Points
|
||||||
return await points(interaction);
|
return points(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send debug message
|
// Send debug message
|
||||||
|
|
|
@ -42,7 +42,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
inline: true,
|
inline: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -55,6 +55,6 @@ export default async (interaction: CommandInteraction) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return interaction reply
|
// Return interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -58,13 +58,13 @@ export default {
|
||||||
// Module - Pterodactyl
|
// Module - Pterodactyl
|
||||||
if (options?.getSubcommand() === "pterodactyl") {
|
if (options?.getSubcommand() === "pterodactyl") {
|
||||||
// Execute Module - Pterodactyl
|
// Execute Module - Pterodactyl
|
||||||
return await pterodactyl(interaction);
|
return pterodactyl(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Group - Roles
|
// Group - Roles
|
||||||
else if (options?.getSubcommandGroup() === "roles") {
|
else if (options?.getSubcommandGroup() === "roles") {
|
||||||
// Execute Group - Roles
|
// Execute Group - Roles
|
||||||
return await roles(interaction);
|
return roles(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send debug message
|
// Send debug message
|
||||||
|
|
|
@ -30,7 +30,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":dollar: Credits [Gift]" as string,
|
title: ":dollar: Credits [Gift]" as string,
|
||||||
description: "We could not read your requested amount." as string,
|
description: "We could not read your requested amount." as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -38,7 +38,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Send interaction reply
|
// Send interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (guild === null) return;
|
if (guild === null) return;
|
||||||
|
@ -64,7 +64,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
value: `${creditNoun(userDB?.credits)}` as string,
|
value: `${creditNoun(userDB?.credits)}` as string,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -86,7 +86,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
value: `${creditNoun(userDB?.credits)}` as string,
|
value: `${creditNoun(userDB?.credits)}` as string,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -107,7 +107,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
value: `${creditNoun(userDB?.credits)}` as string,
|
value: `${creditNoun(userDB?.credits)}` as string,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -159,7 +159,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -171,7 +171,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":shopping_cart: Shop [Pterodactyl]" as string,
|
title: ":shopping_cart: Shop [Pterodactyl]" as string,
|
||||||
description: "I have sent you the code in DM!" as string,
|
description: "I have sent you the code in DM!" as string,
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -208,7 +208,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
description:
|
description:
|
||||||
"Something went wrong, please try again later." as string,
|
"Something went wrong, please try again later." as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -225,7 +225,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":shopping_cart: Shop [Pterodactyl]" as string,
|
title: ":shopping_cart: Shop [Pterodactyl]" as string,
|
||||||
description: "Something went wrong, please try again later." as string,
|
description: "Something went wrong, please try again later." as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
|
|
@ -29,7 +29,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":dollar: Shop - Roles [Buy]" as string,
|
title: ":dollar: Shop - Roles [Buy]" as string,
|
||||||
description: "We could not read your requested name." as string,
|
description: "We could not read your requested name." as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -37,7 +37,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Send interaction reply
|
// Send interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
await guild?.roles
|
await guild?.roles
|
||||||
|
@ -84,7 +84,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
value: `${creditNoun(userDB?.credits)}` as string,
|
value: `${creditNoun(userDB?.credits)}` as string,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":dollar: Shop - Roles [Cancel]" as string,
|
title: ":dollar: Shop - Roles [Cancel]" as string,
|
||||||
description: "We could not read your requested role." as string,
|
description: "We could not read your requested role." as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -36,7 +36,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Send interaction reply
|
// Send interaction reply
|
||||||
return await interaction?.editReply({ embeds: [embed] });
|
return interaction?.editReply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
|
|
||||||
const roleExist = await shopRolesSchema?.find({
|
const roleExist = await shopRolesSchema?.find({
|
||||||
|
@ -71,7 +71,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
value: `${creditNoun(userDB?.credits)}` as string,
|
value: `${creditNoun(userDB?.credits)}` as string,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
|
|
@ -41,17 +41,17 @@ export default {
|
||||||
// Module - Lookup
|
// Module - Lookup
|
||||||
if (options?.getSubcommand() === "lookup") {
|
if (options?.getSubcommand() === "lookup") {
|
||||||
// Execute Module - Lookup
|
// Execute Module - Lookup
|
||||||
return await lookup(interaction);
|
return lookup(interaction);
|
||||||
}
|
}
|
||||||
// Module - About
|
// Module - About
|
||||||
else if (options?.getSubcommand() === "about") {
|
else if (options?.getSubcommand() === "about") {
|
||||||
// Execute Module - About
|
// Execute Module - About
|
||||||
return await about(interaction);
|
return about(interaction);
|
||||||
}
|
}
|
||||||
// Module - Stats
|
// Module - Stats
|
||||||
else if (options?.getSubcommand() === "stats") {
|
else if (options?.getSubcommand() === "stats") {
|
||||||
// Execute Module - Stats
|
// Execute Module - Stats
|
||||||
return await stats(interaction);
|
return stats(interaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send debug message
|
// Send debug message
|
||||||
|
|
|
@ -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,
|
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,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
title: ":hammer: Utilities - Lookup" as string,
|
title: ":hammer: Utilities - Lookup" as string,
|
||||||
description: `${res?.data?.message}: ${res?.data?.query}` as string,
|
description: `${res?.data?.message}: ${res?.data?.query}` as string,
|
||||||
color: config?.colors?.error as ColorResolvable,
|
color: config?.colors?.error as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
@ -95,7 +95,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
|
|
@ -48,7 +48,7 @@ export default async (interaction: CommandInteraction) => {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
color: config?.colors?.success as ColorResolvable,
|
color: config?.colors?.success as ColorResolvable,
|
||||||
timestamp: new Date() as Date,
|
timestamp: new Date(),
|
||||||
footer: {
|
footer: {
|
||||||
iconURL: config?.footer?.icon as string,
|
iconURL: config?.footer?.icon as string,
|
||||||
text: config?.footer?.text as string,
|
text: config?.footer?.text as string,
|
||||||
|
|
Loading…
Add table
Reference in a new issue