Move list of languages to separate command (#5)
This commit is contained in:
parent
d1f14e4d42
commit
a48098bb8c
2 changed files with 22 additions and 2 deletions
|
@ -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: <https://github.com/1Computer1/comp_iler>'
|
||||
]);
|
||||
|
|
21
src/commands/languages.js
Normal file
21
src/commands/languages.js
Normal file
|
@ -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: <https://github.com/1Computer/comp_iler>'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = LanguagesCommand;
|
Loading…
Reference in a new issue