> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mypraxos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord Integration

> Connect Praxos with Discord for community and team communication

## Overview

Discord integration allows Praxos to participate in your servers, channels, and direct messages.

## Features

* Server and channel messaging
* Direct message support
* Rich embeds and formatting
* File attachments
* Thread support
* Slash commands
* Role-based permissions

## Setup

### 1. Create Discord Application

1. Go to [Discord Developer Portal](https://discord.com/developers/applications)
2. Click "New Application"
3. Name your application (e.g., "Praxos")
4. Navigate to "Bot" section
5. Click "Add Bot"
6. Copy the bot token

### 2. Configure Bot Permissions

Required permissions:

* Read Messages/View Channels
* Send Messages
* Send Messages in Threads
* Embed Links
* Attach Files
* Read Message History
* Add Reactions

### 3. Configure Praxos

Add to your `.env` file:

```bash theme={null}
DISCORD_BOT_TOKEN=your_discord_bot_token
DISCORD_APPLICATION_ID=your_application_id
```

### 4. Invite Bot to Server

1. Go to OAuth2 > URL Generator in Developer Portal
2. Select scopes: `bot`, `applications.commands`
3. Select permissions from step 2
4. Copy generated URL
5. Open URL and select server to add bot

### 5. Start Using

* **Direct Messages**: Send DM to bot
* **Channel Messages**: Mention bot using `@Praxos`
* **Slash Commands**: Use `/ask` or other configured commands

## Bot Commands

| Command                    | Description                       |
| -------------------------- | --------------------------------- |
| `/ask [question]`          | Ask Praxos a question             |
| `/summarize`               | Summarize recent channel messages |
| `/remind [time] [message]` | Set a reminder                    |
| `/help`                    | Show available commands           |

## Advanced Features

### Slash Commands

Configure custom slash commands:

```python theme={null}
# Example slash command registration
/schedule [task] [time] - Schedule a task
/search [query] - Search across integrations
/notion [action] - Interact with Notion
```

### Embeds

Praxos sends rich embeds for better formatting:

```
┌─────────────────────────────┐
│ 📊 Task Summary             │
├─────────────────────────────┤
│ Completed: 8                │
│ Pending: 3                  │
│ Due Today: 2                │
└─────────────────────────────┘
```

### Thread Support

Praxos can create and respond in threads:

* Automatic thread creation for long conversations
* Context maintained within threads
* Clean channel organization

### Role-Based Access

Configure which roles can interact with Praxos:

* Admin-only commands
* Channel-specific permissions
* User-level restrictions

## Configuration

### Environment Variables

```bash theme={null}
# Required
DISCORD_BOT_TOKEN=your_bot_token
DISCORD_APPLICATION_ID=your_app_id

# Optional
DISCORD_COMMAND_PREFIX=!
DISCORD_MAX_MESSAGE_LENGTH=2000
DISCORD_ALLOWED_GUILDS=guild_id1,guild_id2
```

### Server Settings

Configure per-server:

* Active channels
* Command prefix
* Response behavior
* Notification preferences

## Troubleshooting

### Bot Appears Offline

* Check token is correct
* Verify intents are enabled in Developer Portal
* Check bot has proper permissions

### Commands Not Working

* Ensure bot has "Use Application Commands" permission
* Re-sync slash commands
* Check bot role hierarchy

### Missing Permissions

```bash theme={null}
# Check bot permissions
/permissions @Praxos
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Slack Integration" href="/integrations/slack" />

  <Card title="Tools Overview" href="/guides/tools-overview" />
</CardGroup>
