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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user