diff --git a/src/commands/help.js b/src/commands/help.js index 56d9792..abdec67 100644 --- a/src/commands/help.js +++ b/src/commands/help.js @@ -14,8 +14,7 @@ class HelpCommand extends Command { 'Put a `>` before a code block or inline codeblock that starts with a language code to execute it.', 'You can add options, separated by semicolons, after the `>`.', '', - '**Enabled Languages (Name: Language Codes):**', - ...this.client.languageHandler.modules.map(lang => `${lang.name}: \`${lang.aliases.join('`, `')}\``), + 'For list of enabled languages, use `languages` command.', '', 'See the readme for usage examples, supported languages, and options: ' ]); diff --git a/src/commands/languages.js b/src/commands/languages.js new file mode 100644 index 0000000..e4c36f3 --- /dev/null +++ b/src/commands/languages.js @@ -0,0 +1,21 @@ +const { Command } = require('discord-akairo'); + +class LanguagesCommand extends Command { + constructor() { + super('languages', { + aliases: ['languages', 'language'], + clientPermissions: ['SEND_MESSAGES'] + }); + } + + exec(message) { + return message.util.send([ + '**List of enabled languages (Name: Language Codes)**:', + ...this.client.languageHandler.modules.map(lang => `${lang.name}: \`${lang.aliases.join('`, `')}\``), + '', + 'See the readme for usage examples, supported langagues, and options: ' + ]); + } +} + +module.exports = LanguagesCommand;