diff --git a/src/utils/bin/commands.ts b/src/utils/bin/commands.ts index 338c9f8..d96129c 100644 --- a/src/utils/bin/commands.ts +++ b/src/utils/bin/commands.ts @@ -3,15 +3,15 @@ import * as bin from './index'; import config from '../../../config.json'; -// Help +// List of commands export const help = async (args: string[]): Promise => { - const commands = Object.keys(bin).sort().join(', '); - var c = ''; - for (let i = 1; i <= Object.keys(bin).sort().length; i++) { + const commands = Object.keys(bin).sort(); + let c = ''; + for (let i = 1; i <= commands.length; i++) { if (i % 7 === 0) { - c += Object.keys(bin).sort()[i - 1] + '\n'; + c += commands[i - 1] + '\n'; } else { - c += Object.keys(bin).sort()[i - 1] + ' '; + c += commands[i - 1] + ' '; } } return `Welcome! Here are all the available commands: