mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
Fix all plugins being enabled by default
This commit is contained in:
parent
bd09c3bdf3
commit
bc4cbe9e30
1 changed files with 3 additions and 5 deletions
|
@ -138,12 +138,10 @@ connect().then(async () => {
|
||||||
* - are explicitly enabled in the guild config
|
* - are explicitly enabled in the guild config
|
||||||
* Dependencies are also automatically loaded by Knub.
|
* Dependencies are also automatically loaded by Knub.
|
||||||
*/
|
*/
|
||||||
async getEnabledPlugins(this: Knub, guildId, guildConfig): Promise<string[]> {
|
async getEnabledGuildPlugins(ctx, plugins): Promise<string[]> {
|
||||||
const configuredPlugins = guildConfig.plugins || {};
|
const configuredPlugins = ctx.config.plugins || [];
|
||||||
const pluginNames: string[] = Array.from(this.guildPlugins.keys());
|
|
||||||
const plugins = Array.from(this.guildPlugins.values()) as ZeppelinPlugin[];
|
|
||||||
|
|
||||||
return pluginNames.filter(pluginName => {
|
return Array.from(plugins.keys()).filter(pluginName => {
|
||||||
return configuredPlugins[pluginName] && configuredPlugins[pluginName].enabled !== false;
|
return configuredPlugins[pluginName] && configuredPlugins[pluginName].enabled !== false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue