From fce241bd425af987da6ec27a022a7e4b3fef0c27 Mon Sep 17 00:00:00 2001 From: Dennis Heinrich Date: Sun, 28 Apr 2024 22:19:58 +0200 Subject: [PATCH] Additional Context for GDPR --- config.example.json | 3 ++- modules/discord/index.js | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config.example.json b/config.example.json index 7eaf9f9..bebd5e6 100644 --- a/config.example.json +++ b/config.example.json @@ -7,5 +7,6 @@ "verifiedRoleId": "", "discordToken": "", "turnstileSitekey": "", - "turnstileSecret": "" + "turnstileSecret": "", + "dataPrivacyPolicy": "https://example.com/privacy" } \ No newline at end of file diff --git a/modules/discord/index.js b/modules/discord/index.js index ec287bf..490f3c4 100644 --- a/modules/discord/index.js +++ b/modules/discord/index.js @@ -1,5 +1,5 @@ const { Client, Events, GatewayIntentBits, EmbedBuilder, ActionRowBuilder, ButtonStyle, ButtonBuilder } = require('discord.js'); -const { discordToken, channelId, channelLogsId, host, port, protocol, verifiedRoleId } = require('../../config.json'); +const { discordToken, channelId, channelLogsId, host, dataPrivacyPolicy, protocol, verifiedRoleId } = require('../../config.json'); const event = require('../events/index').eventBus; const client = new Client({ intents: [GatewayIntentBits.Guilds] }); @@ -41,6 +41,10 @@ client.once(Events.ClientReady, readyClient => { .setDescription('Um diesen Server nutzen zu können, musst du dich verifizieren. Dies kannst du tun, indem du auf den Button klickst. Wurdest du in der Vergangenheit bereits einmal verifiziert, musst du dich durch einen Administrator manuell freischalten lassen.') .setColor('#FF0000'); + if(dataPrivacyPolicy && dataPrivacyPolicy.length > 0) { + targetChannel.send("Mit der Verifizierung stimmst der Datenschutzerklärung und der Verarbeitung deiner personenbezogenen Daten zu. Die Verifizierung schützt andere Mitglieder vor Spam und Missbrauch. Jedes Konto kann pro Person nur einmal verifiziert werden. Das Team behält sich das Recht vor, die Verifizierung jederzeit zu widerrufen.") + targetChannel.send(dataPrivacyPolicy) + } targetChannel.send({ embeds: [embedBuilder], components: [actionRow] }); } });