pull/22/merge
makaracc 3 years ago committed by GitHub
commit 7e1762f5d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save