---
title: Sorielle
---

Sorielle (hereinafter the "Application") is a Discord bot that automatically deletes messages from a venting channel after a configurable timeout period, providing a safe space for users to express themselves with temporary visibility.

## 1. User Documentation

This section is for those interacting with a live instance of the Application.

### Adding Sorielle to Your Server

You can add Sorielle to your Discord server using this [invitation link](https://discord.com/oauth2/authorize?client_id=1391489982887362761).

### Getting Started

1. **Purchase Server Subscription**: Before configuring Sorielle, you need to purchase the server subscription from the Discord store.

2. **Configure Your Venting Channel**: Use the `/config` command to set up your venting channel:
   - Select the text channel where messages should be automatically deleted
   - Set the timeout duration (in seconds) after which messages will be deleted
   - Ensure Sorielle has the necessary permissions: `Manage Messages`, `View Channel`, and `Read Message History`

3. **Using the Venting Channel**: Once configured, any message sent to the designated venting channel will be automatically deleted after the specified timeout period.

### Available Commands

- `/config <channel> <timeout>`: Configure the venting channel and deletion timeout
- `/about`: Learn more about Sorielle and get help information

### Getting Help

If you need assistance or encounter issues:
- Join the [Discord Server](https://chat.nhcarrigan.com)
- Visit the [Forum](https://forum.nhcarrigan.com)
- Contact via email: contact@nhcarrigan.com

## 2. Technical Documentation

This section is for those interested in running their own instance of the Application.

### System Requirements

- Node.js (compatible with Discord.js 14.21.0)
- PostgreSQL database (via Prisma)
- Discord bot token
- Environment variables for configuration

### Architecture Overview

Sorielle is built using:
- **Discord.js**: Discord API interaction and bot framework
- **Prisma**: Database ORM for PostgreSQL
- **Fastify**: Web server for health monitoring and landing page
- **TypeScript**: Type-safe development

### Key Components

- **Main Bot Logic** (`src/index.ts`): Core Discord client setup and event handling
- **Message Handler** (`src/events/messageCreate.ts`): Processes messages in venting channels and schedules deletions
- **Commands** (`src/commands/`): Slash command implementations
- **Database Models**: Prisma-managed PostgreSQL schema for storing server configurations
- **Web Server** (`src/server/serve.ts`): Health monitoring endpoint on port 5019
- **Entitlement System** (`src/utils/checkEntitlement.ts`): Validates server subscriptions

### Installation & Setup

1. Clone the repository
2. Install dependencies: `pnpm install`
3. Set up environment variables (Discord token, database URL)
4. Generate Prisma client: `prisma generate`
5. Build the project: `pnpm run build`
6. Start the application: `pnpm start`

### Database Schema

The application uses a `vents` table to store:
- `serverId`: Discord server ID
- `channelId`: Configured venting channel ID
- `ttl`: Time-to-live for messages (in seconds)

### Development

- **Linting**: `pnpm run lint`
- **Building**: `pnpm run build`
- **Testing**: `pnpm run test` (currently placeholder)

## 3. Legal Documentation

This section is for expansions to our legal policies specific to the Application.

### License

This software is licensed under Naomi's Public License. Full license terms are available at [docs.nhcarrigan.com](https://docs.nhcarrigan.com/#/license).

### Copyright

Copyright held by Naomi Carrigan.

### Privacy & Data Handling

- Sorielle stores minimal server configuration data (server ID, channel ID, timeout settings)
- Messages are automatically deleted according to configured timeouts
- No message content is permanently stored or logged
- For detailed privacy policies, refer to [PRIVACY.md](PRIVACY.md)

### Terms of Service

For complete terms of service, refer to [TERMS.md](TERMS.md).

### Security

For security-related concerns, please review [SECURITY.md](SECURITY.md) for our security policy and reporting procedures.

## 4. Contributing Documentation

This section is for documentation related to contributing to the Application's codebase.

### Contributing Guidelines

Complete contributing guidelines are available at [docs.nhcarrigan.com](https://docs.nhcarrigan.com/#/contributing).

### Code of Conduct

Before interacting with our community, please read our [Code of Conduct](CODE_OF_CONDUCT.md).

### Development Environment

- **Language**: TypeScript
- **Framework**: Discord.js v14
- **Database**: PostgreSQL with Prisma ORM
- **Package Manager**: pnpm
- **Linting**: ESLint with @nhcarrigan/eslint-config

### Code Structure

- `src/commands/`: Slash command implementations
- `src/events/`: Discord event handlers
- `src/interfaces/`: TypeScript interface definitions
- `src/modules/`: Reusable modules and utilities
- `src/utils/`: Utility functions (logging, error handling, entitlements)
- `src/config/`: Configuration files
- `src/server/`: Web server implementation

### Submitting Changes

1. Fork the repository
2. Create a feature branch
3. Make your changes following existing code patterns
4. Ensure linting passes: `pnpm run lint`
5. Test your changes thoroughly
6. Submit a pull request

### Getting Help

For development questions or support:
- [Discord Server](https://chat.nhcarrigan.com)
- GitHub Issues for bug reports and feature requests
