Implement premium features and GDPR compliance in bot and WebUI

- Added new models for premium tier configurations and assignments, enabling feature limits for free and premium users.
- Introduced GDPR deletion logging and commands for user data management.
- Enhanced logging configuration with retention days for audit logs.
- Updated bot commands and job processing to include new premium and GDPR functionalities.
- Improved localization with new keys for premium features and GDPR commands in both English and German.
- Added UI components for managing premium settings and logging retention in the WebUI.
This commit is contained in:
smueller
2026-07-22 16:59:23 +02:00
parent 4852f16f79
commit 08af99ed52
42 changed files with 1546 additions and 30 deletions

View File

@@ -30,7 +30,7 @@ import {
import { createPoll } from './poll.js';
import { createReminder, deleteReminder, listReminders } from './reminders.js';
import { setAfk } from './afk.js';
import { getDeletedSnipe, getEditedSnipe } from './snipe.js';
import { getDeletedSnipe, getEditedSnipe, isSnipeEnabled } from './snipe.js';
import {
UtilityError,
buildChannelInfoEmbed,
@@ -373,6 +373,10 @@ const snipeCommand: SlashCommand = {
async execute(interaction, context) {
const locale = await getGuildLocale(context.prisma, interaction.guildId);
if (!(await ensureGuildCommand(interaction, locale))) return;
if (!(await isSnipeEnabled(context, interaction.guildId!))) {
await interaction.reply({ content: t(locale, 'utility.snipe.disabled'), ephemeral: true });
return;
}
const result = await getDeletedSnipe(context, interaction.channelId!, locale);
if (!result) {
@@ -392,6 +396,10 @@ const editsnipeCommand: SlashCommand = {
async execute(interaction, context) {
const locale = await getGuildLocale(context.prisma, interaction.guildId);
if (!(await ensureGuildCommand(interaction, locale))) return;
if (!(await isSnipeEnabled(context, interaction.guildId!))) {
await interaction.reply({ content: t(locale, 'utility.snipe.disabled'), ephemeral: true });
return;
}
const result = await getEditedSnipe(context, interaction.channelId!, locale);
if (!result) {