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",
|
"owner": "Discord ID of the bot owner(s)",
|
||||||
"token": "123"
|
"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,
|
classToHandle = Language,
|
||||||
extensions = ['.js', '.ts'],
|
extensions = ['.js', '.ts'],
|
||||||
automateCategories,
|
automateCategories,
|
||||||
loadFilter
|
loadFilter = filepath =>
|
||||||
|
!this.client.config.languages.length || this.client.config.languages.includes(path.parse(filepath).name)
|
||||||
}) {
|
}) {
|
||||||
super(client, {
|
super(client, {
|
||||||
directory,
|
directory,
|
||||||
|
|
Loading…
Reference in a new issue