aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-05-28 17:37:21 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-05-28 17:37:21 -0400
commite220f8462bbfb26e3237df34923be4acc5d83fee (patch)
tree2f76703fdb3e16d8c63ebf7b59bcf7c411fd4836 /src
parentf1cdbd260c6c2249fc0d765949d44d889bcaedc8 (diff)
downloadtanzanite-e220f8462bbfb26e3237df34923be4acc5d83fee.tar.gz
tanzanite-e220f8462bbfb26e3237df34923be4acc5d83fee.tar.bz2
tanzanite-e220f8462bbfb26e3237df34923be4acc5d83fee.zip
remove help crap
Diffstat (limited to 'src')
-rw-r--r--src/commands/info/help.ts31
1 files changed, 8 insertions, 23 deletions
diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts
index 3c2fb47..7f91cdf 100644
--- a/src/commands/info/help.ts
+++ b/src/commands/info/help.ts
@@ -33,10 +33,8 @@ export default class HelpCommand extends BushCommand {
});
}
- private async generateEmbed(command?: BushCommand): Promise<MessageEmbed> {
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- //@ts-ignore
- const prefix = await this.handler.prefix();
+ private generateEmbed(command?: BushCommand): MessageEmbed {
+ const prefix = this.handler.prefix;
if (!command) {
const embed = new MessageEmbed()
.addField(
@@ -51,9 +49,7 @@ export default class HelpCommand extends BushCommand {
.setTimestamp();
for (const category of this.handler.categories.values()) {
embed.addField(
- `${category.id.replace(/(\b\w)/gi, (lc): string =>
- lc.toUpperCase()
- )}`,
+ `${category.id.replace(/(\b\w)/gi, (lc): string => lc.toUpperCase())}`,
`${category
.filter((cmd): boolean => cmd.aliases.length > 0)
.map((cmd): string => `\`${cmd.aliases[0]}\``)
@@ -64,9 +60,7 @@ export default class HelpCommand extends BushCommand {
} else {
const embed = new MessageEmbed()
.setColor([155, 200, 200])
- .setTitle(
- `\`${command.description.usage ? command.description.usage : ''}\``
- )
+ .setTitle(`\`${command.description.usage ? command.description.usage : ''}\``)
.addField(
'Description',
`${command.description.content ? command.description.content : ''} ${
@@ -77,19 +71,12 @@ export default class HelpCommand extends BushCommand {
if (command.aliases.length > 1)
embed.addField('Aliases', `\`${command.aliases.join('` `')}\``, true);
if (command.description.examples && command.description.examples.length)
- embed.addField(
- 'Examples',
- `\`${command.description.examples.join('`\n`')}\``,
- true
- );
+ embed.addField('Examples', `\`${command.description.examples.join('`\n`')}\``, true);
return embed;
}
}
- public async exec(
- message: Message,
- { command }: { command: BushCommand }
- ): Promise<void> {
+ public async exec(message: Message, { command }: { command: BushCommand }): Promise<void> {
await message.util.send(this.generateEmbed(command));
}
@@ -99,12 +86,10 @@ export default class HelpCommand extends BushCommand {
): Promise<void> {
if (command) {
await message.reply(
- await this.generateEmbed(
- this.handler.findCommand(command.value) as BushCommand
- )
+ this.generateEmbed(this.handler.findCommand(command.value) as BushCommand)
);
} else {
- await message.reply(await this.generateEmbed());
+ await message.reply(this.generateEmbed());
}
}
}