Skip to content

SkyJoshua/Reactor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.


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.

  • 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

Requirements

  • .NET 10+
  • Valid Valour bot token

Installation

fork the project
git clone https://github.com/YOUR_USERNAME/Reactor.git
cd Reactor
dotnet restore

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


Configuration

Create a .env file in the root directory:

TOKEN=your-valour-bot-token

Do not commit this file to version control.


Running the Bot

dotnet run

Commands

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 <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

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)

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


License

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

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

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.


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. Create a feature branch
  3. Submit a pull request

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages