home / skills / lycfyi / community-agent-plugin / discord-send

This skill sends messages to Discord channels using a user token to post, reply, or respond to conversations.

npx playbooks add skill lycfyi/community-agent-plugin --skill discord-send

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.3 KB
---
name: discord-send
description: "Send messages to Discord channels. Use when user wants to post, reply, or send messages to Discord."
---

# Discord Send

Send messages to Discord channels using your user token.

## Persona Context

**REQUIRED:** Before executing this skill, load your configured persona:

```bash
python ${CLAUDE_PLUGIN_ROOT}/../community-agent/tools/persona_status.py --prompt
```

This outputs your persona definition. Apply it when composing messages:
- **Voice**: Write in first person as the persona ("I recommend..." not "The system suggests...")
- **Style**: Match the persona's communication style (formal/friendly/technical)
- **Personality**: Reflect the persona's traits in how you write
- **Signing**: Sign messages with persona name if appropriate for the context

## When to Use

- User asks to "send to Discord"
- User asks to "post in #channel"
- User asks to "reply to Discord message"
- User wants to "respond to that Discord conversation"
- User wants to post a message they composed

## How to Execute

### Send a message to a channel:

```bash
python ${CLAUDE_PLUGIN_ROOT}/tools/discord_send.py --channel CHANNEL_ID --message "Your message here"
```

### Reply to a specific message:

```bash
python ${CLAUDE_PLUGIN_ROOT}/tools/discord_send.py --channel CHANNEL_ID --message "Your reply" --reply-to MESSAGE_ID
```

## Parameters

| Parameter | Required | Description |
|-----------|----------|-------------|
| --channel | Yes | Target channel ID |
| --message | Yes | Message content (max 2000 chars) |
| --reply-to | No | Message ID to reply to |

## Finding Channel IDs

Use discord-list skill to find channel IDs:
```bash
python ${CLAUDE_PLUGIN_ROOT}/tools/discord_list.py --channels SERVER_ID
```

## Finding Message IDs

Message IDs can be found in:
1. The messages.md files (in message headers)
2. Discord's Developer Mode (right-click → Copy ID)
3. The sync_state.yaml (last_message_id)

## Output

On success, returns:
- Message ID
- Channel ID
- Timestamp
- Reply target (if applicable)

## Limitations

- Maximum message length: 2000 characters
- Rate limited (automatic backoff)
- Requires valid user token in `./.env` (in cwd)

## Warning

Using a user token to send messages may violate Discord's Terms of Service. Use responsibly and at your own risk.

Overview

This skill sends messages to Discord channels using a configured user token. It supports posting new messages, replying to specific messages, and returns message metadata on success. Before use, load and apply your configured persona so outgoing messages match voice, style, and signing conventions.

How this skill works

The tool invokes a Python script that posts to Discord via the user token stored in ./.env. You specify a target channel ID and message text; optionally include a reply-to message ID to make a threaded reply. On success it returns the new message ID, channel ID, timestamp, and reply target if used.

When to use it

  • You want to post a drafted message to a Discord channel.
  • You need to reply to a specific Discord message programmatically.
  • You want to post as a configured persona with a consistent tone and signature.
  • You have a channel ID and valid user token available.
  • You need the message metadata (ID/timestamp) returned after posting.

Best practices

  • Always load and apply your configured persona before sending messages so voice and signing are consistent.
  • Keep messages under 2000 characters to avoid rejections.
  • Confirm channel and message IDs using the discord-list tool or Discord Developer Mode.
  • Handle rate limits by respecting automatic backoff and avoid rapid repeated posts.
  • Store and protect the user token securely in ./.env and follow platform policies.

Example use cases

  • Post an announcement to a community channel using the persona’s voice and signature.
  • Reply to a user thread with a clarifying answer and capture the reply message ID for logs.
  • Automate routine status updates to a channel and record timestamps for audit.
  • Send a prepared message on behalf of a persona during moderated discussions.

FAQ

What credentials are required to send messages?

A valid Discord user token must be available in ./.env in the current working directory. The script uses that token to authenticate requests.

What are the message length and rate limits?

Messages must be 2000 characters or fewer. The tool respects Discord rate limits and performs automatic backoff when necessary.

How do I reply to a specific message?

Provide the target message ID with the --reply-to parameter alongside --channel and --message to post a reply.