From f4acfe2f0204a37e96c8938a5aea6ee1bef668a2 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Thu, 14 Jul 2022 08:37:13 -0400 Subject: add some explicit returns annotations for help command --- src/commands/info/help.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/commands') diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts index d8d91d5..1a8eae5 100644 --- a/src/commands/info/help.ts +++ b/src/commands/info/help.ts @@ -127,7 +127,7 @@ export default class HelpCommand extends BushCommand { return message.util.reply(params); } - private addCommandUsage(embed: EmbedBuilder, command: BushCommand) { + private addCommandUsage(embed: EmbedBuilder, command: BushCommand): void { if (command.usage?.length) { embed.addFields({ name: `» Usage${command.usage.length > 1 ? 's' : ''}`, @@ -136,7 +136,7 @@ export default class HelpCommand extends BushCommand { } } - private addCommandExamples(embed: EmbedBuilder, command: BushCommand) { + private addCommandExamples(embed: EmbedBuilder, command: BushCommand): void { if (command.examples?.length) { embed.addFields({ name: `» Example${command.examples.length > 1 ? 's' : ''}`, @@ -145,7 +145,7 @@ export default class HelpCommand extends BushCommand { } } - private addCommandAliases(embed: EmbedBuilder, command: BushCommand) { + private addCommandAliases(embed: EmbedBuilder, command: BushCommand): void { if (command.aliases?.length > 1) embed.addFields({ name: '» Aliases', @@ -153,7 +153,7 @@ export default class HelpCommand extends BushCommand { }); } - private addCommandArguments(embed: EmbedBuilder, command: BushCommand, isOwner = false, isSuperUser = false) { + private addCommandArguments(embed: EmbedBuilder, command: BushCommand, isOwner = false, isSuperUser = false): void { const format = (id: string, req: boolean) => `${req ? '<' : '['}${id}${req ? '>' : ']'}`; const args = (command.argsInfo ?? []).filter((arg) => { if (arg.ownerOnly && !isOwner) return false; @@ -182,7 +182,7 @@ export default class HelpCommand extends BushCommand { } } - private addCommandRestrictions(embed: EmbedBuilder, command: BushCommand) { + private addCommandRestrictions(embed: EmbedBuilder, command: BushCommand): void { if ( command.ownerOnly || command.superUserOnly || @@ -209,7 +209,7 @@ export default class HelpCommand extends BushCommand { } } - private addLinks(message: CommandMessage | SlashMessage) { + private addLinks(message: CommandMessage | SlashMessage): ActionRowBuilder { const row = new ActionRowBuilder(); const config = this.client.config; @@ -230,7 +230,7 @@ export default class HelpCommand extends BushCommand { return row; } - public override autocomplete(interaction: AutocompleteInteraction) { + public override autocomplete(interaction: AutocompleteInteraction): void { const aliases = this.handler.modules.map((module) => module.aliases).flat(); const fuzzy = new Fuse(aliases, { -- cgit