Agent Native

discord

This skill enables agents to automate Discord server operations via a Python CLI wrapping the Discord REST API.

by LettaOfficial publisherNot reviewed

Identity proven by GitHub's verified organisation badge (letta-ai)

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode
License
MIT (permissive)
Pin
6785511pinned Oct 9, 2026
Context cost
about 1,400 tokenswhen the skill loads
GitHub stars
148on letta-ai/skills
Scripts
1 script

What it does

“Discord automation CLI — send/read/search messages, manage channels and servers, react, create threads, pin messages, and look up users.”
The author's description, from SKILL.md

Generated summary from the skill's own text

This skill enables agents to automate Discord server operations via a Python CLI wrapping the Discord REST API. It supports sending and reading messages, searching across channels, managing reactions and threads, pinning messages, listing users, and administering channels and servers without external dependencies.

When to use it

  • Automate Discord server message workflows and notifications
  • Search and retrieve message history across channels
  • Manage threads, reactions, and pinned messages programmatically
  • Integrate Discord communication into agent automation tasks

When not to

  • When real-time event monitoring is required, polling only
  • If the bot lacks required channel or server permissions
  • For user token authentication or account impersonation

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add letta-ai/skills --skill discord

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install letta-ai/skills discord@6785511e7d3913d9ec598435a77ae637cd45fc89

Installs the commit we checked (6785511).

Copy by hand

Download the folder at 6785511 and put it in .claude/skills/discord for Claude Code and in .agents/skills/discord for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at 6785511

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "discord" by Letta.

Source, pinned to commit 6785511e7d3913d9ec598435a77ae637cd45fc89:
https://github.com/letta-ai/skills/tree/6785511e7d3913d9ec598435a77ae637cd45fc89/tools/discord

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/discord/ for Claude Code and .agents/skills/discord/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/letta/discord

SKILL.md at the pin

---
name: discord
description: Discord automation CLI — send/read/search messages, manage channels and servers, react, create threads, pin messages, and look up users.
---

# Discord automation with `discord_cli.py`

A bundled Python script that wraps the Discord REST API v10. Zero external dependencies — uses only Python stdlib (`urllib`, `json`, `argparse`).

Invoke as: `python3 <path-to-skill>/scripts/discord_cli.py <command> <subcommand> [args]`

## Setup

### 1. Create a Discord bot

1. Go to [Discord Developer Portal](https://discord.com/developers/applications) → **New Application**
2. Click **Bot** on the sidebar → click **Reset Token** → copy the token
3. **Critical**: Scroll down to **Privileged Gateway Intents** and enable **Message Content Intent** — without this, message content will be empty in API responses
4. Optionally enable **Server Members Intent** (needed for `user list`)

### 2. Add the bot to your server

1. Click **OAuth2** on the sidebar → scroll to **OAuth2 URL Generator**
2. Check scopes: `bot` + `applications.commands`
3. Under **Bot Permissions**, check: View Channels, Send Messages, Read Message History, Add Reactions, Attach Files
4. Copy the generated URL → open in browser → select your server → **Authorize**

Shortcut if you know the client ID:
```
https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&scope=bot+applications.commands&permissions=274877975552
```

### 3. Set your bot token

```bash
export DISCORD_BOT_TOKEN="your_token_here"
```

### 4. Verify

```bash
python3 <path-to-skill>/scripts/discord_cli.py auth test
```

Expected output:
```json
{"ok": true, "user": "your-bot-name", "id": "...", "discriminator": "..."}
```

## Commands

### Auth

```bash
python3 <path-to-skill>/scripts/discord_cli.py auth test
```

### Servers

```bash
python3 <path-to-skill>/scripts/discord_cli.py server list
python3 <path-to-skill>/scripts/discord_cli.py server info <server-id>
```

### Channels

```bash
python3 <path-to-skill>/scripts/discord_cli.py channel list <server-id>
```

Returns text, announcement, and forum channels sorted by category and position. Each channel has `id`, `name`, `type`, `category`, and `topic`.

### Messages

```bash
# List recent messages (default 25, chronological order)
python3 <path-to-skill>/scripts/discord_cli.py message list <channel-id>
python3 <path-to-skill>/scripts/discord_cli.py message list <channel-id> --limit 50

# Get a single message
python3 <path-to-skill>/scripts/discord_cli.py message get <channel-id> <message-id>

# Send a message
python3 <path-to-skill>/scripts/discord_cli.py message send <channel-id> "Hello from the agent!"

# Edit a message (bot can only edit its own messages)
python3 <path-to-skill>/scripts/discord_cli.py message edit <channel-id> <message-id> "Updated text"

# Delete a message
python3 <path-to-skill>/scripts/discord_cli.py message delete <channel-id> <message-id>

# Search messages in a server
python3 <path-to-skill>/scripts/discord_cli.py message search <server-id> "query"
python3 <path-to-skill>/scripts/discord_cli.py message search <server-id> "query" --channel-id <id> --author-id <id> --limit 10
```

### Reactions

```bash
python3 <path-to-skill>/scripts/discord_cli.py reaction add <channel-id> <message-id> 👍
python3 <path-to-skill>/scripts/discord_cli.py reaction remove <channel-id> <message-id> 👍
python3 <path-to-skill>/scripts/discord_cli.py reaction list <channel-id> <message-id>
```

### Threads

```bash
# Create a new thread in a channel
python3 <path-to-skill>/scripts/discord_cli.py thread create <channel-id> "Discussion Topic"

# Create a thread from a specific message
python3 <path-to-skill>/scripts/discord_cli.py thread create <channel-id> "Bug Triage" --message-id <id>
```

### Pins

```bash
python3 <path-to-skill>/scripts/discord_cli.py pin list <channel-id>
python3 <path-to-skill>/scripts/discord_cli.py pin add <channel-id> <message-id>
python3 <path-to-skill>/scripts/discord_cli.py pin remove <channel-id> <message-id>
```

### Users

```bash
python3 <path-to-skill>/scripts/discord_cli.py user list <server-id>
python3 <path-to-skill>/scripts/discord_cli.py user list <server-id> --limit 200
python3 <path-to-skill>/scripts/discord_cli.py user info <user-id>
```

Mention users in messages as `<@USER_ID>`.

## Output format

All commands output JSON to stdout. Errors go to stderr with an `error` field and HTTP `status` code.

Message objects include: `id`, `author`, `author_id`, `content`, `timestamp`, plus optional `thread_id`, `attachments` (with `filename` and `url`), and `reactions` (with `emoji` and `count`). Null and empty fields are pruned.

## Troubleshooting

### Message content is empty

**Message Content Intent** is not enabled. Go to Developer Portal → Bot → Privileged Gateway Intents → toggle on Message Content Intent.

### `user list` returns empty or partial results

**Server Members Intent** is not enabled. Toggle it on in the same intents section.

### 403 / missing access errors

The bot doesn't have permission for that channel. Check bot role permissions in Discord server settings, or re-authorize with the correct permissions.

### Token errors

If the bot token was rotated, update `DISCORD_BOT_TOKEN` with the new value.

## Notes

- Discord uses **Snowflake IDs** (large numbers like `1161736244074659893`) for all identifiers. You cannot use channel names directly — use `channel list <server-id>` to find IDs first.
- The bot can only access servers it has been invited to and channels it has permissions for.
- Bot token auth uses the official Discord API — no user token extraction, no ToS risk.
- Messages are returned in chronological order (oldest first).

From letta-ai/skills at 6785511, shown as plain text under its license: MIT (permissive). The license text is in tools/discord/LICENSE.

View SKILL.md on GitHub at 6785511

Files

5 files, 25 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at 6785511
All 50 skills from Letta

More from Letta

  • acquiring-skills

    Enables the agent to discover and install skills from multiple registries including Hermes Skills Hub, ClawHub, GitHub, and community repositories.

    Agents not labelled yet · about 3.1K tokens · pinned 6 days ago

  • browser-use

    Control a real browser using Chrome DevTools Protocol over WebSocket to navigate pages, interact with UI, fill forms, scrape sites, and capture screenshots or…

    Claude Code, Codex, Cursor +4 · about 3.2K tokens · pinned 6 days ago

  • Context Doctor

    Context Doctor investigates and repairs an agent's context including memory, system prompt, and skills by analyzing observed behavior as evidence.

    Claude Code, Codex, Cursor +3 · about 1K tokens · pinned 6 days ago

  • creating-mods

    This skill creates and edits mod files that extend local Letta instances with tools, slash commands, event handlers, custom model providers, permissions, and…

    Claude Code, Codex, Cursor +4 · about 2.4K tokens · pinned 6 days ago

  • creating-skills

    This skill guides developers in creating modular packages that extend Letta Code agent capabilities with specialized knowledge, workflows, tool integrations…

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 4.5K tokens · pinned 6 days ago

  • curating-memory-palace

    This skill lets the agent maintain a Memory Palace, a structured dashboard view that shows the user what the agent is working on, what it could do next, and…

    Agents not labelled yet · about 3.1K tokens · pinned 6 days ago

All Productivity skills
  • suggest-automations

    This skill suggests three relevant automations to users based on their team role and connected apps, then builds the chosen workflow using the build-workflow…

    by n8nOfficial publisher

    Claude Code, Codex, Cursor +3 · about 1.9K tokens · pinned 6 days ago

  • agent-mail-automation

    This skill enables agents to automate email operations through Composio's Agent Mail toolkit via the Rube MCP server.

    by ComposioOfficial publisher

    Claude Code, Codex, Cursor +3 · about 700 tokens · pinned 6 days ago

  • inbox-manager

    This skill transforms an overflowing inbox into a short prioritized list by reading email from Gmail, Microsoft 365, or pasted text, sorting messages into…

    by AnthropicOfficial publisher

    Claude Code, Codex, Cursor +4 · about 2.5K tokens · pinned 6 days ago

  • huggingface-papers

    This skill retrieves and analyzes AI research papers from Hugging Face's paper index and arXiv by fetching paper content as markdown or structured metadata…

    by Hugging FaceOfficial publisher

    Claude Code, Codex, Cursor +4 · about 2.2K tokens · pinned 6 days ago

  • scheduling-tasks

    This skill lets you create and manage scheduled tasks using the letta cron CLI, sending prompts to the agent on a timer for reminders, periodic work, and…

    by LettaOfficial publisher

    Claude Code, Codex, Cursor +4 · about 2.3K tokens · pinned 6 days ago

  • figma-use-figjam

    This skill enables agents to programmatically create and edit FigJam boards using the Figma plugin API via the use_figma MCP tool.

    by FigmaOfficial publisher

    Claude Code · about 1.7K tokens · pinned 6 days ago

Open roles at Letta

4 open roles on the jobs board

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use