---
title: Discord
icon: discord
description: Set up the Discord resource in Python.
---

## Dependencies

No additional dependencies - uses `aiohttp` (included).

For credential setup, see the [Discord Setup](/home/setup/discord) guide.

## Configuration

```python
import os
from mirage import Workspace, MountMode
from mirage.resource.discord import DiscordConfig, DiscordResource

config = DiscordConfig(token=os.environ["DISCORD_BOT_TOKEN"])
resource = DiscordResource(config=config)
ws = Workspace({"/discord/": resource}, mode=MountMode.READ)
```

## Config Reference

| Field   | Required | Description       |
| ------- | -------- | ----------------- |
| `token` | Yes      | Discord Bot Token |
