Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 36 additions & 19 deletions PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

**Data Controller:** This project is maintained by [@Egg-03](https://github.com/eggy03).

This Discord bot was built as an open source project with a privacy-first mindset. The Service is provided at no cost and is intended for use as-is.
This Discord bot was built as an open source project with a privacy-first mindset.
The Service is provided at no cost and is intended for use as-is.

This page is used to inform users regarding our policies with the collection, use, and disclosure of information for anyone choosing to use the bot.

If you choose to use this bot in your Discord server, you agree to the collection and use of information in accordance with this policy. The data collected is strictly limited to what is necessary for the bot's core functionality and moderation features. We do not use or share your data with anyone except as described here.
If you choose to use this bot in your Discord server, you agree to the collection and use of information in accordance with this policy.
The data collected is strictly limited to what is necessary for the bot's core functionality and moderation features.

We do not sell your data.
We do not share personal data with third parties except where necessary to provide the service, such as cloud hosting and database providers, or in response to lawful requests.
Any third-party processors we use are bound by contractual data-protection requirements and may only process data on our behalf and for the purpose of providing the service.

---

Expand All @@ -15,7 +21,8 @@ If you choose to use this bot in your Discord server, you agree to the collectio
This Privacy Policy applies **only** to the official hosted instance of this bot that is managed by [@Egg-03](https://github.com/eggy03).
The official instance can be identified by its **Discord Application ID: `1381658412550590475`**.

If you or someone else self-hosts the bot, that instance is operated independently and is **not covered by this Privacy Policy**. In those cases, data handling is the sole responsibility of the self-host.
If you or someone else self-hosts the bot, that instance is operated independently and is **not covered by this Privacy Policy**.
In those cases, data handling is the sole responsibility of the host of that particular instance.

---

Expand All @@ -24,14 +31,14 @@ If you or someone else self-hosts the bot, that instance is operated independent
The bot only stores data when specific features are explicitly enabled by server administrators:

### If **Message Logging** is enabled:
- Message Content (encrypted at rest, only decrypted when sending logs back to your Discord server)
- Message Content
- Message ID
- Author ID (Discord user ID)
- Channel ID
- Guild ID
- Timestamp

Message content is never stored in plain text and is not used for analytics or shared outside of your server.
Message content is stored in plain text and is not used for analytics or shared outside your server.

### If **only Audit Logging** is enabled:
- Guild ID
Expand All @@ -45,53 +52,63 @@ The stored data is used solely for server moderation purposes.

## Data Retention

- All stored message data is automatically deleted after **30 days**. When message data is deleted, both the encrypted content and associated metadata are permanently removed from the database.
- No data is permanently retained or used for analytics.
- Configuration data (e.g., log channel IDs) is kept until the server administrator removes it or disables the feature.
- All stored message contents and their metadata are automatically deleted after **30 days**.
- No data is permanently retained or used for any analytics.
- Configuration data (e.g., log channel IDs) is kept until the server administrator unregisters the bot or removes it from the server.
- Server administrators can also request immediate deletion of all stored data for their guild by contacting us.

---

## Log Data
## Diagnostic Logs

In case of runtime errors, the bot may log basic diagnostic information such as error messages, timestamps, and internal event states to assist with debugging.
Logs may include additional metadata such as guild IDs, channel IDs, message IDs, or user IDs when necessary to diagnose issues.

In case of runtime errors, the bot may log basic diagnostic information such as error messages, timestamps, and internal event states to assist with debugging. These logs do not contain any personal user data and are not persisted long-term.
Log retention is governed by our infrastructure providers and operational requirements, and may vary over time.
Logs are not used for analytics.

---

## Security

We take data protection seriously:
- All sensitive data (e.g., message content) is encrypted before being saved.
- Decryption keys are securely managed and are only used to deliver logs back to your Discord server. They are never used for analytics or operator access.
We take reasonable technical and organizational measures to protect stored data from unauthorized access, loss, or misuse.
This includes access controls, limited operator access, and infrastructure security best practices.

Message content is stored in plain text on cloud infrastructure.
This is the same general model used by Discord (i.e., messages are not end-to-end encrypted).
We do not perform analytics on message content.

However, no method of transmission over the internet or method of electronic storage is 100% secure, and we cannot guarantee absolute security.

---

## Children’s Privacy

This bot is not intended for users under the age of 13. It does not knowingly collect any personal information from children. If it is discovered that such data has been inadvertently stored, it will be deleted immediately upon request.
This bot is not intended for users under the age of 13. It does not knowingly collect any personal information from children.
If it is discovered that such data has been inadvertently stored, it will be deleted immediately upon request.

---

## User Rights (GDPR Compliance)
## User Rights

If you are located in the EU/EEA, you have the following rights under the General Data Protection Regulation (GDPR):
All users, regardless of location, have the following rights:

- **Right of Access**: You may request what data (if any) is associated with your Discord user ID.
- **Right to Erasure**: You may request deletion of your data from the database.

Due to the encryption of message content, we are unable to provide decrypted content under any circumstances.
To protect user privacy, we will verify the identity of the requestor before fulfilling access or deletion requests (for example: confirmation from the guild owner or proof of control of the Discord user account).
We will respond to verified requests within 30 days.
If additional information is needed, we will notify you and may extend the response period where permitted by law.

To request access or deletion, please contact us using the method below.

---

## Contact

For privacy-related questions or GDPR requests:
For privacy-related questions or other requests:
- GitHub: [Submit an issue or discussion](https://github.com/eggy03/PaperTrailBot/issues)
- Email: `egg03@duck.com`
- Email: `eggzerothree@proton.me`

---

Expand Down
38 changes: 16 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Overview
PaperTrail is a free and open source, self-hostable and privacy-friendly Discord bot designed to deliver structured, reliable logging across all major audit and runtime events. It hooks into Discord's audit logs to cover for most of the audit log events and for events not covered by Audit Logs, it supplements them with real-time listeners to bridge gaps in native coverage (e.g. voice state, boosts, message edits and deletions, custom triggers).
PaperTrail is a free and open-source, self-hostable, and privacy-friendly Discord bot designed to provide audit log data directly in a channel—without requiring users to navigate server settings each time.

Key Features:

- Full audit log integration (supports over 50+ event types) and generic support for unknown types
- Encrypted Message logging (edit, delete)
- Message logging (edit, delete)
- Member activity tracking (joins, leaves, kicks, bans, updates)
- Voice activity logging (join/leave, move)
- Auto-deletion of logged messages after 30 days
Expand All @@ -24,32 +24,27 @@ Key Features:
>
> It is recommended that you deploy the [Persistence API](https://github.com/Egg-03/PaperTrail-PersistenceAPI?tab=readme-ov-file#papertrail-persistenceapi) service before deploying the bot itself since the bot relies on the URL of the service to communicate

## v1.2.2 Legacy
Checkout the guide for hosting the legacy version [here](https://github.com/Egg-03/PaperTrailBot/blob/legacy-v1.2.2/README.md).
v1.2.2 has unresolved bugs and runs on JDA 5. It is recommended to not use that version anymore.

## V2 and above
Since v2, the project has been split into two services:
The project is split into two services:
1) The core bot service
2) A [Persistence API](https://github.com/Egg-03/PaperTrail-PersistenceAPI) service

The following guide shows how to set up the bot service

To read the guide on deploying the Persistence API Service, click [here](https://github.com/Egg-03/PaperTrail-PersistenceAPI?tab=readme-ov-file#papertrail-persistenceapi)
To read the guide on deploying the Persistence API Service, click [here](https://github.com/eggy03/PaperTrail-PersistenceAPI?tab=readme-ov-file#papertrail-persistenceapi)

### Step 1: Get Required Secrets

You will need the following environment variables to run the bot:

| Variable | Description |
| ---------------- | -------------------------------------------------------------------------------------------------------- |
| `TOKEN` | Discord application bot token (from the [Developer Portal](https://discord.com/developers/applications)) |
| `MESSAGE_SECRET` | Random secret string for encrypting/decrypting messages (generate yourself) |
| `API_URL` | Internal URL of the Persistence API (e.g., `http://persistence:8080`) |
| Variable | Description |
|-----------|-----------------------------------------------------------------------------------------------------------|
| `TOKEN` | Discord application bot token (from the [Developer Portal](https://discord.com/developers/applications)) |
| `API_URL` | Internal URL of the Persistence API (e.g., `http://persistence:8080`) |

### Step 2: Deployment Options

Fork this repository to your GitHub account, connect it to your preferred cloud platform, and configure your environment variables in the platform. Some paltform services may also support adding secrets directly from your `.env` file.
Fork this repository to your GitHub account, connect it to your preferred cloud platform, and configure your environment variables in the platform.
Some platform services may also support adding secrets directly from your `.env` file.

#### Cloud Platforms with GitHub + Docker Support
- These can auto-deploy using the included `Dockerfile`
Expand All @@ -68,19 +63,18 @@ Fork this repository to your GitHub account, connect it to your preferred cloud
The bot exposes a `/ping` endpoint on port **8080**.
This endpoint simply returns `200 OK` and is intended for platforms or uptime monitors to check if the bot is alive.

> Note: This is **not a public API** and serves no other function beyond health monitoring.
> Note: This is **not a public API** and serves no other function beyond internal service health monitoring.

# Privacy

PaperTrail is built with privacy-first principles. By default, it **does not log any personal data** unless features are explicitly enabled by server admins.

- Messages are logged for moderation purposes only, if enabled.
- All stored messages are encrypted before being saved to the database.
- Logs are automatically deleted after 30 days.
- No personal data is used for analytics, profiling, or sold to third parties.
- If requested, users can have their data deleted by ID.

*Never post sensitive information in public channels. While PaperTrail encrypts all the data it receives, other bots may not.*
*Never post sensitive information in public channels.*

[Read the full Privacy Policy](./PRIVACY.md)

Expand All @@ -89,14 +83,15 @@ PaperTrail is built with privacy-first principles. By default, it **does not log
If you discover a security vulnerability in PaperTrail, please report it **privately**.

- Do **not** open public GitHub issues for security bugs.
- Instead, email me at 📧 **egg03@duck.com**
- Instead, email me at 📧 **eggzerothree@proton.me**
- I will respond as soon as possible and work with you to resolve the issue.

[View the full Security Policy](./SECURITY.md)

# Terms of Use

PaperTrail is provided under the Apache 2.0 License and is intended for responsible use. By using the public instance or self-hosting it, you agree to the basic terms outlined in our [Terms of Service](./TERMS.md).
PaperTrail is provided under the Apache 2.0 License and is intended for responsible use.
By using the official hosted instance or self-hosting it, you agree to the basic terms outlined in our [Terms of Service](./TERMS.md).

# License

Expand All @@ -110,5 +105,4 @@ You are free to:
Just make sure to include proper attribution and comply with the [terms](https://www.apache.org/licenses/LICENSE-2.0).

---
Feel free to contribute to this guide or raise issues on GitHub if you get stuck!

Feel free to contribute to this guide or raise issues on GitHub if you get stuck!
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Currently, only the `main` branch of PaperTrail is actively maintained. Bug fixe

If you discover a security vulnerability in PaperTrail, please **do not open a GitHub issue**. Instead, report it responsibly by contacting:

📧 **egg03@duck.com**
📧 **eggzerothree@proton.me**

Please include:

Expand Down
41 changes: 29 additions & 12 deletions TERMS.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Terms of Service

_Last updated: June 22, 2025_
_Last updated: February 02, 2026_

Thank you for using **PaperTrail**, an open-source Discord logging bot.
Thank you for using **PaperTrail**, an open-source Discord audit and message logging bot.

By using this software (either self-hosted or via the public instance), you agree to the following terms:
By using this software (either self-hosted or via the official hosted instance), you agree to the following terms:

---

## 1. Usage

You may use this bot for free, either:
- By hosting it yourself
- Or by using the public hosted instance (if one is available)
- Or by using the official hosted instance (if available)

You agree to use the bot responsibly, and not for any of the following:
- Harassment, abuse, or spamming users
Expand All @@ -23,26 +23,43 @@ You agree to use the bot responsibly, and not for any of the following:

## 2. Privacy

This bot logs message and event data **only if you enable those features**. All message content is encrypted, and logs are automatically deleted after 30 days. See our [Privacy Policy](./PRIVACY.md) for details.
This bot logs message and event data **only if you enable those features**.
Message content is stored in plain text and logs are automatically deleted after 30 days.

See our [Privacy Policy](./PRIVACY.md) for full details on data handling, retention, and user rights.

---

## 3. Self-Hosting

If you self-host this bot, you are solely responsible for:
- Data storage and retention
- Security practices
- Compliance with applicable privacy laws

The project maintainers are not responsible for how self-hosted instances handle user data.

---

## 3. Modifications
## 4. Modifications

You are free to fork, modify, or self-host this project under the terms of the [Apache 2.0 License](./LICENSE). If you publicly redistribute a modified version, you must preserve the original license.
You are free to fork, modify, or self-host this project under the terms of the [Apache 2.0 License](./LICENSE).
If you publicly redistribute a modified version, you must preserve the original license and attribution.

---

## 4. No Warranty
## 5. No Warranty

This software is provided **"as is"**, without any warranty of any kind. The developers are not liable for any damages, data loss, or moderation outcomes resulting from the use of this bot.
This software is provided **"as is"**, without any warranty of any kind.
The developers are not liable for any damages, data loss, or moderation outcomes resulting from the use of this bot.

---

## 5. Changes
## 6. Changes

We may update these terms as the project evolves. You are encouraged to check this document periodically.
We may update these terms as the project evolves.
Continued use of the bot after changes constitutes acceptance of the updated terms.

---

If you have any questions or concerns, please open an issue on the [GitHub repository](https://github.com/Egg-03/PaperTrailBot/issues).
If you have any questions or concerns, please open an issue on the [GitHub repository](https://github.com/eggy03/PaperTrailBot/issues).
Loading
Loading