diff --git a/PRIVACY.md b/PRIVACY.md index f4f4d57..7176e9d 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -1,151 +1,101 @@ - - - +# Privacy Policy -

Privacy Policy

+**Effective Date:** March 11, 2026 -

Effective Date: March 11, 2026

+This Privacy Policy describes how Reactor collects, uses, and stores information when used within a Valour server. -

-This Privacy Policy describes how Reactor collects, uses, -and stores information when used within a Valour server. -

+--- -
+## 1. Information Collected -

1. Information Collected

- -

Reactor collects only the minimum data required to function. -

-

Information Stored (Persisted to Disk)

- +### Information Stored (Persisted to Disk) -

Information Not Stored

- +- Planet IDs +- Channel IDs +- Message IDs of reaction role messages +- Emoji-to-role mappings +- Confirmation message delete delay settings -
+### Information Not Stored -

2. Purpose of Data Collection

+- Message content (beyond the initial reaction message text provided by the administrator) +- User IDs (beyond what is transiently used to assign or remove roles during a reaction event) +- Direct Messages (DMs) +- User credentials +- Email addresses +- Passwords +- IP addresses +- Analytics or tracking data -

Stored information is used exclusively to:

+--- -
    -
  1. Track which messages are configured as reaction role messages
  2. -
  3. Map emoji reactions to planet roles
  4. -
  5. Assign or remove roles from members when they react or unreact to a tracked message
  6. -
  7. Automatically clean up stale data when messages are deleted
  8. -
+## 2. Purpose of Data Collection + +Stored information is used exclusively to: + +1. Track which messages are configured as reaction role messages +2. Map emoji reactions to planet roles +3. Assign or remove roles from members when they react or unreact to a tracked message +4. Automatically clean up stale data when messages are deleted -

Data is not used for marketing, advertising, profiling, or analytics. -

-
+--- -

3. Data Storage and Security

+## 3. Data Storage and Security -

-All data is stored in a local SQLite database file (reactor.db) on the hosting server. -

+All data is stored in a local SQLite database file (`reactor.db`) on the hosting server. -

-The operator of the self-hosted instance is responsible for securing the hosting environment -and the database file. -

+The operator of the self-hosted instance is responsible for securing the hosting environment and the database file. -

Stale or deleted reaction messages are automatically removed from the database on bot startup. -

-
+--- -

4. Third-Party Processing

+## 4. Third-Party Processing -

-Reactor does not transmit any data to external services beyond the Valour.gg API, -which is required for core bot functionality such as assigning roles and sending messages. -

+Reactor does not transmit any data to external services beyond the Valour.gg API, which is required for core bot functionality such as assigning roles and sending messages. -

Reactor does not use any external AI providers, analytics services, or cloud storage. -

-
+--- -

5. Data Retention

+## 5. Data Retention -

Reaction role message data is retained in the SQLite database until: -

- +- The reaction message is deleted from Valour (automatic cleanup on bot startup) +- An administrator runs the `r.delete` command +- The database file is manually deleted by the host operator -
+--- -

6. Self-Hosted Responsibility

+## 6. Self-Hosted Responsibility -

Reactor is designed for self-hosting. -

-

The hosting operator is responsible for: -

- +- Server security +- Network configuration +- Bot token protection +- Database file security +- Compliance with applicable laws -
+--- -

7. Changes to This Policy

+## 7. Changes to This Policy -

-If data collection practices change in future versions, -this Privacy Policy will be updated prior to implementation. -

+If data collection practices change in future versions, this Privacy Policy will be updated prior to implementation. -

-Continued use of the Bot after updates constitutes acceptance -of the revised policy. -

+Continued use of the Bot after updates constitutes acceptance of the revised policy. -
+--- -

8. Contact Information

+## 8. Contact Information -

For privacy-related inquiries: -

-

-Email: contact@skyjoshua.xyz -

- - - \ No newline at end of file +Email: contact@skyjoshua.xyz \ No newline at end of file diff --git a/README.md b/README.md index 5d7eaf3..98871de 100644 --- a/README.md +++ b/README.md @@ -1,166 +1,102 @@ - - - +# Reactor -

Reactor

+Reactor is a Valour.gg bot that enables server administrators to create reaction role messages. Users can react to a message with an emoji to automatically be assigned or removed from a role. -

-Reactor is a Valour.gg bot that enables server administrators to create reaction role messages. -Users can react to a message with an emoji to automatically be assigned or removed from a role. -

+--- -
+## Features -

Features

- +- Create reaction role messages in any planet channel +- Map emojis to roles — reacting adds the role, removing the reaction removes it +- Automatic cleanup of deleted reaction messages from the database +- Persistent storage via SQLite — survives bot restarts +- Permission-based command access (Manage Roles or Full Control required) +- Built with .NET and the Valour SDK +- Open-source under AGPL-3.0 -
+--- -

How It Works

-

Reactor connects to the Valour.gg API and listens for reactions on configured messages.

- +## How It Works -
+Reactor connects to the Valour.gg API and listens for reactions on configured messages. -

Requirements

- +- Reaction role messages and their emoji-to-role mappings are stored in a local SQLite database +- When a user reacts to a tracked message, Reactor assigns the mapped role +- When a user removes their reaction, Reactor removes the mapped role +- Stale messages (deleted from Valour) are automatically pruned from the database on startup -
+--- -

Installation

+## Requirements -
fork the project
-git clone https://github.com/YOUR_USERNAME/Reactor.git
+- .NET 10+
+- Valid Valour bot token
+
+---
+
+## Installation
+
+```bash
+git clone https://git.skyjoshua.xyz/SkyJoshua/Reactor.git
 cd Reactor
-dotnet restore
+dotnet restore +``` -

-All required NuGet packages are installed automatically via the .csproj file. -

+All required NuGet packages are installed automatically via the `.csproj` file. -
+--- -

Configuration

+## Configuration -

Create a .env file in the root directory:

+Create a `.env` file in the root directory: +``` +TOKEN=your-valour-bot-token +``` -
TOKEN=your-valour-bot-token
- -

Do not commit this file to version control. -

-
+--- -

Running the Bot

+## Running the Bot +```bash +dotnet run +``` -
dotnet run
+--- -
+## Commands -

Commands

+All commands require **Manage Roles** or **Full Control** permissions, except `r.help` and `r.source`. -

All commands require Manage Roles or Full Control permissions, except r.help and r.source.

+| Command | Description | +|---|---| +| `r.help` | Shows the list of available commands | +| `r.source` | Shows the source code of the bot | +| `r.create ` | Creates a new reaction role message in the current channel | +| `r.add ` | Maps an emoji to a role on a reaction message | +| `r.remove ` | Removes an emoji-to-role mapping from a reaction message | +| `r.delete ` | Deletes a reaction message and all its role mappings | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CommandDescription
r.helpShows the list of available commands
r.sourceShows the source code of the bot
r.create <message text>Creates a new reaction role message in the current channel
r.add <messageId> <emoji> <roleId>Maps an emoji to a role on a reaction message
r.remove <messageId> <emoji>Removes an emoji-to-role mapping from a reaction message
r.delete <messageId>Deletes a reaction message and all its role mappings
+--- -
+## Data Storage -

Data Storage

+Reactor stores the following data in a local SQLite database (`reactor.db`): -

Reactor stores the following data in a local SQLite database (reactor.db):

-
    -
  • Reaction message IDs, channel IDs, and planet IDs
  • -
  • Emoji-to-role mappings per reaction message
  • -
  • Configurable delete delay for confirmation messages (default: 5 seconds)
  • -
+- Reaction message IDs, channel IDs, and planet IDs +- Emoji-to-role mappings per reaction message +- Configurable delete delay for confirmation messages (default: 5 seconds) -

-Full privacy policy:
- -https://github.com/SkyJoshua/Reactor/blob/main/PRIVACY.md - -

+Full privacy policy: +https://git.skyjoshua.xyz/SkyJoshua/Reactor/blob/main/PRIVACY.md -
+--- -

License

-

-This project is licensed under the -GNU Affero General Public License v3.0 (AGPL-3.0). -

+## License -

-See the LICENSE file for details:
- -https://github.com/SkyJoshua/Reactor/blob/main/LICENSE - -

+This project is licensed under the **GNU Affero General Public License v3.0 (AGPL-3.0)**. -

-If you modify and deploy this project publicly (including as a hosted service), -you must make your source code available under the same AGPL-3.0 license. -

+See the LICENSE file for details: +https://git.skyjoshua.xyz/SkyJoshua/Reactor/blob/main/LICENSE -
- -

Contributing

- -

-Contributions are welcome. By submitting a contribution, you agree that your -contributions will be licensed under AGPL-3.0. -

- -
    -
  1. Fork the repository
  2. -
  3. Create a feature branch
  4. -
  5. Submit a pull request
  6. -
- - - \ No newline at end of file +If you modify and deploy this project publicly (including as a hosted service), you must make your source code available under the same AGPL-3.0 license. \ No newline at end of file diff --git a/Services/MessageService.cs b/Services/MessageService.cs index 36ba40e..6c4820c 100644 --- a/Services/MessageService.cs +++ b/Services/MessageService.cs @@ -25,7 +25,7 @@ namespace Reactor.Services var member = await message.FetchAuthorMemberAsync(); string memberPing = member != null ? $"«@m-{member.Id}»" : ""; - bool hasPermission = await HasPermissionAsync(member, channelCache[channelId]); + bool hasPermission = await HasPermissionAsync(member); string withoutPrefix = content.Substring(prefix.Length); @@ -150,7 +150,7 @@ namespace Reactor.Services } } - private static async Task HasPermissionAsync(PlanetMember member, Channel channel) + private static async Task HasPermissionAsync(PlanetMember member) { if (member == null) return false;