12 |
return Help.find(callback); |
return Help.find(callback); |
13 |
} |
} |
14 |
|
|
15 |
export function renderCommandList(): string { |
export function renderCommandList(limit = 40): string { |
16 |
let str = `Type \`${DiscordClient.client.config.get('prefix')}help <CommandName>\` for more information about a specific command.\n\n`; |
let str = `Type \`${DiscordClient.client.config.get('prefix')}help <CommandName>\` for more information about a specific command.\n\n`; |
17 |
|
let index = 0; |
18 |
|
|
19 |
for (const cmd of Help) { |
for (const cmd of Help) { |
20 |
|
if (limit <= index) |
21 |
|
break; |
22 |
|
|
23 |
str += `**${cmd.name}**\n${cmd.shortBrief}\n\n`; |
str += `**${cmd.name}**\n${cmd.shortBrief}\n\n`; |
24 |
|
index++; |
25 |
} |
} |
26 |
|
|
27 |
return str; |
return str; |