---
title: Cordelia Taryne
---

Cordelia Taryne (hereinafter the "Application") is an AI-powered multi-purpose assistant Discord bot that leverages Anthropic's Claude AI to provide various text processing, analysis, and assistance features. The bot features a distinctive vampire personality named Cordelia with haughty and self-inflated characteristics, providing users with intelligent assistance while maintaining a unique character persona.

## 1. User Documentation

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

### Getting Started

To use Cordelia Taryne, [add her to your Discord account](https://discord.com/oauth2/authorize?client_id=1338664192714211459).

### Available Commands

Cordelia Taryne offers the following slash commands:

#### `/about`
- **Description**: Learn more about the bot
- **Usage**: Simply run `/about` to get information about the bot, including version and commit details
- **Access**: Available to all users

#### `/query`
- **Description**: Ask Cordelia a general question
- **Parameters**: `prompt` (required, max 2000 characters) - The question you would like to ask
- **Usage**: `/query prompt: What is the capital of France?`
- **Access**: Requires active subscription

#### `/alt-text`
- **Description**: Generate descriptive and accessible alt-text for images
- **Parameters**: `image` (required) - The image file to generate alt-text for
- **Supported formats**: JPG, JPEG, PNG, GIF, WEBP
- **Limitations**: Maximum 5MB file size, maximum 8000px dimensions
- **Usage**: Upload an image and run `/alt-text image: [your-image]`
- **Access**: Requires active subscription

#### `/eval`
- **Description**: Have Cordelia evaluate and run code snippets
- **Parameters**: `code` (required, max 2000 characters) - The code to evaluate
- **Usage**: `/eval code: 2 + 2 * 3`
- **Access**: Requires active subscription

#### `/mood`
- **Description**: Analyze the sentiment and mood of text passages
- **Parameters**: `text` (required, max 2000 characters) - The text to analyze
- **Usage**: `/mood text: I had an amazing day at the beach!`
- **Access**: Requires active subscription

#### `/proofread`
- **Description**: Have Cordelia proofread text for grammar and style
- **Parameters**: `text` (required, max 2000 characters) - The text to proofread
- **Usage**: `/proofread text: This are my essay about science.`
- **Access**: Requires active subscription

#### `/summarise`
- **Description**: Generate concise summaries of longer text passages
- **Parameters**: `text` (required, max 2000 characters) - The text to summarize
- **Usage**: `/summarise text: [long article or document text]`
- **Access**: Requires active subscription

### Subscription Model

Most features require an active subscription. The bot uses Discord's premium subscription system:
- Free users can access the `/about` command
- Subscribers gain access to all AI-powered features
- Bot owner (developer) has unlimited access for testing and maintenance

### Personality

Cordelia has a distinctive personality:
- **Character**: A vampire assistant with a haughty and self-inflated demeanour
- **Appearance**: Blonde hair in twin buns, pink-red cat-like eyes, pale skin, gold dress
- **Behavior**: Subtly condescending but never directly rude or insulting
- **Communication**: Professional assistance without role-playing text

### Support and Feedback

- **Bug Reports**: Open a GitHub issue
- **Feature Requests**: Create a GitHub issue with the enhancement label
- **General Support**: Visit the [chat server](http://chat.nhcarrigan.com)
- **Contact**: Email `contact@nhcarrigan.com`

## 2. Technical Documentation

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

### Architecture Overview

Cordelia Taryne is built with:
- **Runtime**: Node.js with TypeScript
- **Discord Library**: discord.js v14
- **AI Provider**: Anthropic Claude API (Claude Sonnet 4)
- **Web Server**: Fastify (for status page)
- **Package Manager**: pnpm
- **Build System**: TypeScript compiler

### System Requirements

- Node.js 22+ 
- pnpm package manager
- Git for version control
- Environment variable management (1Password recommended)

### Environment Variables

Required environment variables:
- `DISCORD_TOKEN`: Discord bot token
- `AI_TOKEN`: Anthropic API key
- `npm_package_version`: Application version (auto-set by npm/pnpm)

### Installation and Setup

1. **Clone the repository**:
   ```bash
   git clone https://github.com/nhcarrigan/cordelia-taryne.git
   cd cordelia-taryne
   ```

2. **Install dependencies**:
   ```bash
   pnpm install
   ```

3. **Set up environment variables**:
   - Create a `prod.env` file with required variables
   - Configure 1Password CLI for secure environment management

4. **Build the application**:
   ```bash
   pnpm run build
   ```

5. **Deploy slash commands**:
   ```bash
   node prod/commands/[command-name].js
   ```

6. **Start the application**:
   ```bash
   pnpm start
   ```

### Project Structure

```
src/
├── index.ts              # Main application entry point
├── commands/             # Slash command definitions
├── modules/              # Command implementation logic
├── config/
│   └── personality.ts    # Bot personality configuration
├── server/
│   └── serve.ts         # Web server for status page
└── utils/               # Utility functions
    ├── ai.ts            # Anthropic AI client
    ├── calculateCost.ts # Usage cost calculation
    ├── isSubscribed.ts  # Subscription validation
    ├── logger.ts        # Logging utilities
    └── replyToError.ts  # Error handling
```

### Development Workflow

1. **Linting**: `pnpm run lint`
2. **Building**: `pnpm run build`
3. **Development**: Make changes in `src/`, build, and test
4. **Deployment**: Use the build artifacts in `prod/`

### API Integration

The bot integrates with:
- **Discord API**: For bot functionality and user interactions
- **Anthropic API**: For AI-powered text processing
- **Discord Premium**: For subscription management

### Monitoring and Logging

- Uses `@nhcarrigan/logger` for structured logging
- Tracks API usage and costs for each command
- Monitors subscription events (create/delete)
- Error handling with automatic logging

### Security Considerations

- All AI interactions are ephemeral (private responses)
- Subscription validation before AI API calls
- Input validation and sanitization
- Secure environment variable management
- Rate limiting through Discord's built-in mechanisms

## 3. Legal Documentation

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

### Data Processing

- **User Data**: Discord user IDs are logged for usage tracking
- **Content Processing**: Text and images are sent to Anthropic for processing
- **Retention**: Logs are retained according to standard practices
- **Privacy**: All interactions are ephemeral and not stored permanently

### Third-Party Services

The Application integrates with:
- **Discord**: User authentication and interaction handling
- **Anthropic**: AI text and image processing
- **1Password**: Secure environment variable management

### Subscription Terms

- Subscriptions are managed through Discord's premium system
- Features are gated behind active subscription status
- Bot owner maintains unlimited access for maintenance
- Usage is tracked and logged for billing transparency

### Intellectual Property

- Bot personality and character design are original creations
- Source code is licensed under Naomi's Public License
- Avatar and visual assets are proprietary
- AI model responses are generated by Anthropic's Claude

### Usage Limits

- Text input limited to 2000 characters per command
- Image uploads limited to 5MB and 8000px dimensions
- API usage tracked and billed to service operator
- Fair use policies apply to prevent abuse

## 4. Contributing Documentation

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

### Getting Started

1. **Read the Guidelines**: Review `CONTRIBUTING.md` and `CODE_OF_CONDUCT.md`
2. **Fork the Repository**: Create your own fork on GitHub
3. **Set Up Development Environment**: Follow technical documentation setup
4. **Create Feature Branch**: Use descriptive branch names

### Development Standards

#### Code Quality
- **TypeScript**: Strict typing required
- **ESLint**: Must pass linting with zero warnings (`pnpm run lint`)
- **Formatting**: Follow established code style
- **Comments**: JSDoc comments for all public functions

#### Architecture Patterns
- **Command Pattern**: Separate command definitions from implementations
- **Module Separation**: Clear separation between Discord logic and AI logic
- **Error Handling**: Comprehensive error handling with logging
- **Type Safety**: Proper TypeScript types throughout

#### File Structure Conventions
```
src/
├── commands/[name].ts    # Discord command definitions
├── modules/[name].ts     # Command implementation logic
├── utils/[name].ts       # Shared utilities
└── config/[name].ts      # Configuration files
```

### Contribution Process

1. **Issue Creation**: Create detailed GitHub issues for bugs/features
2. **Discussion**: Discuss approach before starting work
3. **Implementation**: Follow coding standards and patterns
4. **Testing**: Test thoroughly in development environment
5. **Pull Request**: Create detailed PR with description and testing notes
6. **Review**: Address feedback from maintainers
7. **Merge**: Maintainers will merge approved changes

### Testing Guidelines

- **Manual Testing**: Test all command paths and error cases
- **Integration Testing**: Verify Discord and Anthropic integrations
- **Subscription Testing**: Test both subscribed and unsubscribed flows
- **Error Scenarios**: Test network failures, API errors, and edge cases

### Feature Development

#### Adding New Commands
1. Create command definition in `src/commands/[name].ts`
2. Implement logic in `src/modules/[name].ts`
3. Add command to main handler in `src/index.ts`
4. Test subscription gating and error handling
5. Update documentation

#### Modifying AI Behavior
1. Update personality configuration if needed
2. Modify system prompts in relevant modules
3. Test with various inputs and edge cases
4. Consider cost implications of changes

### Code Review Standards

- **Functionality**: Does the code work as intended?
- **Style**: Does it follow established patterns?
- **Security**: Are there any security concerns?
- **Performance**: Are there efficiency improvements?
- **Documentation**: Are changes properly documented?

### Release Process

1. **Version Bump**: Update version in `package.json`
2. **Build**: Ensure clean build with `pnpm run build`
3. **Testing**: Comprehensive testing of new features
4. **Documentation**: Update relevant documentation
5. **Deployment**: Deploy to production environment
6. **Monitoring**: Monitor for issues post-deployment

### Community Guidelines

- **Respectful Communication**: Follow Code of Conduct
- **Constructive Feedback**: Provide helpful, actionable feedback
- **Collaboration**: Work together to improve the project
- **Learning**: Help others learn and grow
- **Recognition**: Credit contributors appropriately

For more detailed contributing information, see the `CONTRIBUTING.md` file in the repository.
