# Discord Server

> Manage a Discord server via CLI commands. Use this skill whenever the user mentions Discord, wants to post messages, manage channels or roles, check member lists, send embeds, or do anything related to Discord server management. Trigger phrases: "post to Discord", "check the server", "announce", "who's in the Discord", "create a channel", "set up a role", "manage server", "assign role", "send message to Discord", "read Discord messages".

- Skill: `conorluddy/discord-server` (Agent Skill, multi-file: 10 files)
- Install (CLI): `npx skillmds@latest add conorluddy/discord-server`
- Raw SKILL.md: https://api.skillmd.com/api/skills/conorluddy/discord-server/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: conorluddy (https://skillmd.com/u/conorluddy)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/conorluddy/discord-server

---


# Discord Server Management

Manage a Discord server via CLI scripts in `commands/`. 18 stateless commands (read, write, destructive) that connect, execute, and disconnect. All output is JSON. Pass `--help` to any command for usage info.

## Prerequisites

Bot token in `.env` must be valid and the bot must be in the server with `Manage Channels`, `Manage Roles`, and `Send Messages` permissions.

## Available Commands

All commands are run as:
```bash
node commands/<command>.mjs <args>
```

### Read Operations (safe, no side effects)

| Command | Usage | Purpose |
|---|---|---|
| `server-info.mjs` | `node commands/server-info.mjs` | Server overview: members, channels, roles, boost level |
| `list-channels.mjs` | `node commands/list-channels.mjs` | All channels grouped by category with topics |
| `list-members.mjs` | `node commands/list-members.mjs` | All human members with roles and join dates |
| `read-messages.mjs` | `node commands/read-messages.mjs <channel> [--limit N]` | Read recent messages (default 10, max 100) |
| `list-roles.mjs` | `node commands/list-roles.mjs` | All roles with name, color, member count, hoisted status |
| `list-threads.mjs` | `node commands/list-threads.mjs <channel>` | Active threads in a channel |

### Write Operations (create content, non-destructive)

| Command | Usage | Purpose |
|---|---|---|
| `send-message.mjs` | `node commands/send-message.mjs <channel> <message>` | Send a message to any channel |
| `send-embed.mjs` | `node commands/send-embed.mjs <channel> --title "..." --description "..." [--field "Name\|Value"] [--color #hex] [--footer "..."]` | Send a rich branded embed |
| `edit-message.mjs` | `node commands/edit-message.mjs <channel> <message-id> <new-content>` | Edit a bot message |
| `create-channel.mjs` | `node commands/create-channel.mjs <category> <name> [--topic "..."] [--read-only]` | Create a text channel under a category |
| `create-thread.mjs` | `node commands/create-thread.mjs <channel> <thread-name> [--message-id ID]` | Create a thread, optionally from a message |
| `set-topic.mjs` | `node commands/set-topic.mjs <channel> <topic>` | Update a channel's topic |
| `create-role.mjs` | `node commands/create-role.mjs <name> [--color #hex] [--hoist]` | Create a new role |
| `assign-role.mjs` | `node commands/assign-role.mjs <username> <role-name>` | Assign an existing role to a member |
| `remove-role.mjs` | `node commands/remove-role.mjs <username> <role-name>` | Remove a role from a member |
| `pin-message.mjs` | `node commands/pin-message.mjs <channel> <message-id>` | Pin a message in a channel |

### Destructive Operations (require --confirm flag)

These commands will not execute without the `--confirm` flag. Always ask the user for explicit confirmation before running destructive operations.

| Command | Usage | Purpose |
|---|---|---|
| `delete-channel.mjs` | `node commands/delete-channel.mjs <channel> --confirm` | Delete a channel permanently |
| `delete-role.mjs` | `node commands/delete-role.mjs <role-name> --confirm` | Delete a role permanently |

## Output Format

All commands return JSON to stdout. Successful operations include `{ "ok": true, ... }`. Errors include `{ "error": "description" }`. Parse the output to confirm success before reporting to the user.

## Common Workflows

**Post an announcement:**
```bash
node commands/send-message.mjs announcements "New release is live. Check the changelog."
```

**Send a branded embed:**
```bash
node commands/send-embed.mjs announcements --title "UPDATE" --description "New features deployed." --field "Status|Live"
```

**Read recent messages:**
```bash
node commands/read-messages.mjs general --limit 20
```

**Assign a role to a member:**
```bash
node commands/assign-role.mjs "username" "Admin"
```

**Create a discussion thread:**
```bash
node commands/create-thread.mjs chat "Weekly Discussion"
```

**Add a new channel:**
```bash
node commands/create-channel.mjs GENERAL "off-topic" --topic "Anything goes"
```

**Check server health:**
```bash
node commands/server-info.mjs
```

