Add languages configuration
This commit is contained in:
parent
1cc481c7af
commit
db79b4b026
2 changed files with 10 additions and 3 deletions
|
@ -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"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue