# Discord Init

> Initialize Discord configuration. Use when user wants to set up, configure, or connect their Discord account for the first time.

- Skill: `majiayu000/discord-init-2` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/discord-init-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/discord-init-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/majiayu000/discord-init-2

---


# Discord Init

Automatically configure the Discord server from your account.

## When to Use

- User says "set up Discord" or "configure Discord"
- User says "connect my Discord account"
- User says "initialize Discord"
- First time setup before syncing
- When `config/server.yaml` doesn't exist or needs updating

## How to Execute

### Auto-detect and save server:

```bash
python ${CLAUDE_PLUGIN_ROOT}/tools/discord_init.py
```

### Select a specific server:

```bash
python ${CLAUDE_PLUGIN_ROOT}/tools/discord_init.py --server SERVER_ID
```

## What It Does

All paths are relative to cwd (current working directory):

1. Connects to Discord using your token from `./.env`
2. Lists all servers you have access to
3. If one server: auto-selects it
4. If multiple: selects the first one (or use `--server` to pick)
5. Saves configuration to `./config/server.yaml`

## Output

Creates/updates `./config/server.yaml` with:
- `server_id`: Your Discord server ID
- `server_name`: Server display name
- `data_dir`: Where messages are stored
- `retention_days`: Default sync history

## Prerequisites

- `./.env` file with `DISCORD_USER_TOKEN` set (in cwd)

## Next Steps

After init, use discord-sync to download messages.

