const Revolt = require('revolt.js'); const { client, logger, config } = require('..'); module.exports.meta = { name: 'help', aliases: [], description: 'List all commands.' } /** * * @param { Revolt.Message } message * @param { string[] } args */ module.exports.run = async (message, args) => new Promise(async (resolve, reject) => { let msgContent = `My current prefix is \`${config.prefix}\`. To add me to a group, hit me up with a friend request first.\n\u200b\n* * *\n\u200b\n` + `| Name | Aliases | Description |\n` + `| ---- | ------- | ----------- |\n`; require('../util/command_loader').commands .forEach(command => { msgContent += `| ${config.prefix}${command.meta.name} | ${command.meta.aliases?.join(', ') || 'None'} | ${command.meta.description || 'None'}\n`; }); client.channels.sendMessage(message.channel, msgContent); });