Gdpr compliance - #13
Merged
Merged
Conversation
New comandos/retencion.py cog, covering two mechanisms: - A daily background task that deletes rows older than config.RETENTION_DAYS (default 30) from every log holding personal data (main_log, mod_log, accepted, rejected). Rows with a missing/ unparseable date are kept rather than guessed-and-deleted. Rows pruned from mod_log are also evicted from the live bot.data_mod. log_spam_file/log_image_spam_file (the known-spam text/image-hash caches) are intentionally excluded - they store only content/hashes, never an author, so they aren't personal data to begin with. - A %olvidar command (restricted to the moderation role) that removes every row belonging to a given user from those same logs on request, matched by the stable author_id (not the displayed username, which can change). Shows a preview of what will be deleted and requires an explicit Confirmar/Cancelar button click - re-checked against the moderation role at click time, not just at command invocation - before doing anything irreversible. The erasure itself is logged to a new gdpr_erasure_log.csv (id + counts only, never the erased content), as an audit trail that a request was honored. configuration.py gains RETENTION_DAYS and log_gdpr_file. read_last_csv_row moved from tests/test_moderacion.py to tests/factories.py for reuse.
Describes what personal data the bot collects, why, retention periods (30 days for personal data, indefinite for spam signatures since those aren't personal data), who has access, and how to request erasure via the new %olvidar command. Explicitly marked as a technical draft that needs legal review before being published as an official policy, with placeholders for the actual data controller/contact info.
Was discord.Intents().all() - every intent, including the privileged Members and Presences ones. Nothing in this codebase uses guild member chunking, join/leave/update events, or presence data (confirmed via a full grep). Switched to Intents.default() + message_content = True, keeping the one privileged intent this bot genuinely needs (every spam/moderation check reads message.content) and dropping the two it doesn't. Fewer privileged intents requested means less to justify and reapply for under Discord's developer policy as the bot grows.
cmaureir
force-pushed
the
gdpr-compliance
branch
2 times, most recently
from
August 15, 2026 23:15
d8d46c3 to
31a521a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.