diff --git a/src/handler/structures/Command.ts b/src/handler/structures/Command.ts index 7de3106..10fefb6 100755 --- a/src/handler/structures/Command.ts +++ b/src/handler/structures/Command.ts @@ -13,11 +13,11 @@ export default class Command { hidden: boolean; usage: string constructor(command: CommandContext) { - this.name = command.name || ""; - this.description = command.description || ""; + this.name = command.name || "generic"; + this.description = command.description || "generic command base"; this.aliases = command.aliases || []; this.module = command.module || ""; - this.cooldown = command.cooldown || 0; + this.cooldown = command.cooldown || 1; this.guild = command.guild || false; this.dev = command.dev || false; this.nsfw = command.nsfw || false; diff --git a/src/modules/misc/help.ts b/src/modules/misc/help.ts index 6a9079d..7b35109 100644 --- a/src/modules/misc/help.ts +++ b/src/modules/misc/help.ts @@ -25,19 +25,31 @@ export = class Help extends Command { // @ts-ignore return embed.addField(`${lingua[ctx.settings.locale].CATEGORIES[folder.toUpperCase()].name || folder} [\`${[...(await Commands(folder, ctx.client))].length}\`]`, `\`${ctx.config.variables.prefix[2]} help ${folder}\``, true) }) - embed.setTitle("Help") + embed.setTitle(`${ctx.config.variables.name} Help`) return ctx.channel.send(embed) } let arg = ctx.args[0] if (await (await Folders()).includes(arg)) { - + if (arg === 'developer') return let commands = await (await Commands(arg, ctx.client)).map(command => `\`${command.name}\` - ${command.description}`) embed.addField("Commands", commands.join("\n")) // @ts-ignore embed.setTitle(`${lingua[ctx.settings.locale].CATEGORIES[arg.toUpperCase()].name || arg}`) + // @ts-ignore + embed.setDescription(`${lingua[ctx.settings.locale].CATEGORIES[arg.toUpperCase()].desc || ""}\n\nTotal Commands: **${commands.length}**`) return ctx.channel.send(embed) } - + // @ts-ignore + let command = ctx.client.commands.find((c) => c.name.toLowerCase() == arg || (c.aliases && c.aliases.includes(arg))) + // let aliases = ctx.client.commands.filter() + if (command) { + embed.setTitle("Command Help") + if (command.aliases?.length !== 0) embed.addField("Aliases", `ā‡’\`${command.aliases?.join("`\nā‡’`")}\``, true) + // @ts-ignore + embed.setDescription(`**Cooldown:** ${command.cooldown}s\n**Module:** ${lingua[ctx.settings.locale].CATEGORIES[command.module.toUpperCase()].name || command.module}\n**NSFW:** ${command.nsfw}`) + embed.addField("Usage", `\`thal ${command.name}\` ${command.usage}`, true) + ctx.channel.send(embed) + } } } \ No newline at end of file diff --git a/src/modules/nsfw/e621.ts b/src/modules/nsfw/e621.ts index 86c2ad3..a9a36d1 100644 --- a/src/modules/nsfw/e621.ts +++ b/src/modules/nsfw/e621.ts @@ -9,7 +9,8 @@ export = class E621 extends Command { name: "e621", description: "Get an Image from E621", aliases: ['e6', 'esix'], - cooldown: 2 + cooldown: 2, + nsfw: true }) } diff --git a/src/utils/lingua b/src/utils/lingua index 6ef3be5..e6ba2d3 160000 --- a/src/utils/lingua +++ b/src/utils/lingua @@ -1 +1 @@ -Subproject commit 6ef3be5f4e4600ed920f3aed83393cbd9ec6533f +Subproject commit e6ba2d38b0b2c9d2e5ba2b0e5379a9a6178daa1b diff --git a/variables.ts b/variables.ts index 0c70408..e52d184 100644 --- a/variables.ts +++ b/variables.ts @@ -11,8 +11,8 @@ export default { /** * Discord ID of the Developer */ - // id: "318044130796109825", // Lio - id: "3180441307961098255", // Lio + id: "318044130796109825", // Lio + // id: "3180441307961098255", // Lio link: "https://kji.tf/twitter" } ],