diff --git a/README.md b/README.md index 67806c5..89c204d 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -# Anitrox Dev Branch (anitrox_unstable) -This is the development branch for Anitrox, If you want those fresh hot Anitrox builds right from the oven, you've come to the right place! +# Anitrox Stable Branch (anitrox_stable) +This is the stable branch, If you want the prepackaged and prepared builds, you're at the right place. # Dependencies to get started To begin, you will need to satisfy the following dependencies: -Node.JS: 14 +Node.JS: 16 npm: 6.14 # Let's get this ~~party~~ bot started! For first time start up, You will need to run ``npm install`` to install the needed npm packages. Afterwards fill out the ``config-example.json`` and rename it to ``config.json``, then just run ``node start.js`` (or ``./start.js`` on Linux)! ⚠️ If you don't specify the Owner ID, Some commands such as the bot controls will be unusable! # Support -Anitrox isn't really supported but you can get help from the Discord server if you need any: discord.gg/5nQtMNpf43 +Support is available on the [Discord Server!](discord.gg/5nQtMNpf43), or @ me on [Twitter!](twitter.com/IDeleteSystem64); diff --git a/commands/eval.js b/commands/eval.js index df12710..c7a88bc 100644 --- a/commands/eval.js +++ b/commands/eval.js @@ -20,7 +20,7 @@ module.exports = { await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getString('code'))); }, - handle (_, config, user, code) { + handle (client, config, user, code) { if (user.id === config.ownerID) { try { const evaled = inspect(eval(code)); diff --git a/commands/help.js b/commands/help.js index 99ee3e5..77e7377 100644 --- a/commands/help.js +++ b/commands/help.js @@ -2,35 +2,45 @@ module.exports = { name: require('path').parse(__filename).name, description: 'Get help on anything from commands, to what the bot does! just not your homework..', - options: [], - - async parseMessage (client, config, message) { - await message.channel.send(this.handle(client, config, message.author)); + options: [{ + name: '', + description: 'View Information about this command', + required: false + }], + async parseMessage (client, config, message, args) { + await message.channel.send(this.handle(client, config, message.author, args)); }, async parseInteraction (client, config, interaction) { await interaction.reply(this.handle(client, config, interaction.user)); }, - handle (_, config, user) { + handle (client, config, user, args) { + if (!args[0]) { + return client.generateErrorMessage('Note to self: Design default help embed.', user.displayAvatarURL()); + } + + const cmdName = args[0].toLowerCase(); + const cmd = client.commands.get(cmdName); + + if (!cmd) { + return client.generateErrorMessage(`${cmdName} is not a valid command! Run ${config.prefix}help for a command list.`); + } return { embeds: [{ - title: 'HELP! SEYMOUR! THE BOT IS ON FIRE!', - description: 'Get help on anything from commands, to what the bot does! just not your homework..', color: 9442302, + title: ':question: Command Help', + description: `Everything you've ever wanted to know about ${cmdName}!`, footer: { icon_url: user.displayAvatarURL(), - text: `${config.footerTxt} | No mother it's just the northern lights` + text: config.footerTxt }, fields: [ - { - name: 'Command List', - value: '[Click here!](https://github.com/IDeletedSystem64/anitrox/blob/dev/commands.md)' - }, - { - name: '...Or is the bot actually on fire?', - value: 'Join the [support server!](https://discord.gg/grebRGsBZ3)' - } + { name: 'Command Name', value: `${cmdName}`, inline: true }, + { name: 'Command Description', value: cmd.description, inline: true }, + { name: 'Command Options', value: cmd.options.map(option => option.name).join('\n') || 'None', inline: true }, + { name: 'Command Option Description', value: cmd.options.map(option => option.description).join('\n') || 'None', inline: true }, + { name: 'Option Legend', value: '[Option] REQUIRED\n