Enhance AutoMod configuration by introducing event-specific settings and thresholds. Refactor Automod schemas to include event configurations, thresholds, and limits for ignored roles and channels. Update database interactions to support new structure and improve handling of AutoMod rules in cogs, ensuring dynamic thresholds for various events. Update dashboard components to accommodate new configurations and improve user experience in managing AutoMod settings.
Some checks failed
CI / Bot (Python) (push) Successful in 12s
CI / Dashboard (Next.js) (push) Failing after 9s

This commit is contained in:
TheOnlyMace
2026-07-21 23:05:05 +02:00
parent d24b810164
commit 36b32de34c
17 changed files with 842 additions and 165 deletions

View File

@@ -22,7 +22,11 @@ const AutomodForm = dynamic(() => import("@/components/dashboard/automod-form").
});
export default async function AutomodPage({ params }: { params: { guildId: string } }) {
const config = await api.getAutomod(params.guildId);
const [config, channels, roles] = await Promise.all([
api.getAutomod(params.guildId),
api.getChannels(params.guildId),
api.getRoles(params.guildId),
]);
if (!config) return null;
@@ -38,7 +42,12 @@ export default async function AutomodPage({ params }: { params: { guildId: strin
</div>
</div>
<AutomodForm initialConfig={config} guildId={params.guildId} />
<AutomodForm
initialConfig={config}
guildId={params.guildId}
channels={channels || []}
roles={roles || []}
/>
</div>
);
}