Move list of languages to separate command (#5)

This commit is contained in:
tipakA 2019-06-02 06:33:45 +02:00 committed by 1Computer1
parent d1f14e4d42
commit a48098bb8c
2 changed files with 22 additions and 2 deletions

21
src/commands/languages.js Normal file
View 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;