aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-07-14 08:37:13 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-07-14 08:37:13 -0400
commitf4acfe2f0204a37e96c8938a5aea6ee1bef668a2 (patch)
tree50642777503e72526ac84c9d13868a0ffab4a5af /src/commands
parentac78e887e163f05b5e87db729d8ad2735e112ffc (diff)
downloadtanzanite-f4acfe2f0204a37e96c8938a5aea6ee1bef668a2.tar.gz
tanzanite-f4acfe2f0204a37e96c8938a5aea6ee1bef668a2.tar.bz2
tanzanite-f4acfe2f0204a37e96c8938a5aea6ee1bef668a2.zip
add some explicit returns annotations for help command
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/info/help.ts14
1 files changed, 7 insertions, 7 deletions
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<ButtonBuilder> {
const row = new ActionRowBuilder<ButtonBuilder>();
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, {