Don't enable integrations for disabled plugins

This commit is contained in:
Vankka 2024-10-20 23:12:23 +03:00
parent fa1b517d5e
commit b82840bb51
No known key found for this signature in database
GPG Key ID: 62E48025ED4E7EBB
2 changed files with 5 additions and 2 deletions

View File

@ -43,7 +43,11 @@ public abstract class PluginIntegration<DT extends DiscordSRV> extends AbstractM
@Override
@MustBeInvokedByOverriders
public boolean isEnabled() {
if (discordSRV.config().integrations.disabledIntegrations.contains(getIntegrationName())) {
String integrationName = getIntegrationName();
if (discordSRV.config().integrations.disabledIntegrations.contains(integrationName)) {
return false;
}
if (!discordSRV.pluginManager().isPluginEnabled(integrationName)) {
return false;
}
return super.isEnabled();

View File

@ -192,7 +192,6 @@ public class JDAConnectionManager implements DiscordConnectionManager {
@Subscribe
public void onDebugGenerate(DebugGenerateEvent event) {
StringBuilder builder = new StringBuilder();
builder.append("Intents: ").append(intents);
builder.append("\nCache Flags: ").append(cacheFlags);