diff --git a/config.example.json b/config.example.json index 24ef5a6..fb13dea 100644 --- a/config.example.json +++ b/config.example.json @@ -1,4 +1,10 @@ { - "owner": "123", - "token": "123" + "owner": "Discord ID of the bot owner(s)", + "token": "Bot token", + "languages": [ + "Language whitelist, e.g.", + "haskell", + "python", + "Leave empty to enable all languages" + ] } diff --git a/src/struct/LanguageHandler.js b/src/struct/LanguageHandler.js index 2c7282e..f362927 100644 --- a/src/struct/LanguageHandler.js +++ b/src/struct/LanguageHandler.js @@ -11,7 +11,8 @@ class LanguageHandler extends AkairoHandler { classToHandle = Language, extensions = ['.js', '.ts'], automateCategories, - loadFilter + loadFilter = filepath => + !this.client.config.languages.length || this.client.config.languages.includes(path.parse(filepath).name) }) { super(client, { directory,