← Back to Skills Marketplace
devxoul

Agent Discordbot

by Jeon Suyeol · GitHub ↗ · v1.10.5
cross-platform ✓ Security Clean
467
Downloads
0
Stars
0
Active Installs
12
Versions
Install in OpenClaw
/install agent-discordbot
Description
Interact with Discord servers using bot tokens - send messages, read channels, manage reactions
README (SKILL.md)

Agent DiscordBot

A TypeScript CLI tool that enables AI agents and humans to interact with Discord servers using bot tokens. Unlike agent-discord which extracts user tokens from the desktop app, agent-discordbot uses standard Discord Bot tokens for server-side and CI/CD integrations.

Quick Start

# Set your bot token
agent-discordbot auth set your-bot-token

# Verify authentication
agent-discordbot auth status

# Send a message
agent-discordbot message send 1234567890123456789 "Hello from bot!"

# List channels
agent-discordbot channel list

Authentication

Bot Token Setup

agent-discordbot uses Discord Bot tokens which you create in the Discord Developer Portal:

# Set bot token (validates against Discord API before saving)
agent-discordbot auth set your-bot-token

# Set with a custom bot identifier
agent-discordbot auth set your-bot-token --bot deploy --name "Deploy Bot"

# Check auth status
agent-discordbot auth status

# Clear stored credentials
agent-discordbot auth clear

Getting a Bot Token

  1. Go to discord.com/developers/applications
  2. Click New Application, give it a name, and create
  3. Go to Bot in the left sidebar
  4. Click Reset Token (or Copy if the token is still visible)
  5. Copy the token and store it securely

Inviting the Bot to a Server

After creating the application:

  1. Go to OAuth2 > URL Generator in the left sidebar
  2. Under Scopes, select bot
  3. Under Bot Permissions, select the permissions your bot needs (Send Messages, Read Message History, etc.)
  4. Copy the generated URL and open it in your browser
  5. Select the server and authorize

Message Content Privileged Intent

Bots in 100 or more servers require verification (you can apply once you reach 75+ servers), and verified bots must apply for access to the Message Content intent. Enable it to read message content:

  1. Go to discord.com/developers/applications
  2. Select your application
  3. Go to Bot in the left sidebar
  4. Under Privileged Gateway Intents, enable Message Content Intent
  5. Save changes

Without this, verified bots receive empty content fields (DMs and mentions are exempt).

Multi-Bot Management

Store multiple bot tokens and switch between them:

# Add multiple bots
agent-discordbot auth set deploy-bot-token --bot deploy --name "Deploy Bot"
agent-discordbot auth set alert-bot-token --bot alert --name "Alert Bot"

# List all stored bots
agent-discordbot auth list

# Switch active bot
agent-discordbot auth use deploy

# Use a specific bot for one command (without switching)
agent-discordbot message send 1234567890123456789 "Alert!" --bot alert

# Remove a stored bot
agent-discordbot auth remove deploy

The --bot \x3Cid> flag is available on all commands to override the active bot for a single invocation.

Memory

The agent maintains a ~/.config/agent-messenger/MEMORY.md file as persistent memory across sessions. This is agent-managed — the CLI does not read or write this file. Use the Read and Write tools to manage your memory file.

Reading Memory

At the start of every task, read ~/.config/agent-messenger/MEMORY.md using the Read tool to load any previously discovered server IDs, channel IDs, user IDs, and preferences.

  • If the file doesn't exist yet, that's fine — proceed without it and create it when you first have useful information to store.
  • If the file can't be read (permissions, missing directory), proceed without memory — don't error out.

Writing Memory

After discovering useful information, update ~/.config/agent-messenger/MEMORY.md using the Write tool. Write triggers include:

  • After discovering server IDs and names (from server list, etc.)
  • After discovering useful channel IDs and names (from channel list, etc.)
  • After discovering user IDs and names (from user list, etc.)
  • After the user gives you an alias or preference ("call this the alerts bot", "my main server is X")
  • After setting up bot identifiers (from auth list)

When writing, include the complete file content — the Write tool overwrites the entire file.

What to Store

  • Server IDs with names
  • Channel IDs with names and categories
  • User IDs with display names
  • Bot identifiers and their purposes
  • User-given aliases ("alerts bot", "announcements channel")
  • Any user preference expressed during interaction

What NOT to Store

Never store bot tokens, credentials, or any sensitive data. Never store full message content (just IDs and channel context). Never store file upload contents.

Handling Stale Data

If a memorized ID returns an error (channel not found, server not found), remove it from MEMORY.md. Don't blindly trust memorized data — verify when something seems off. Prefer re-listing over using a memorized ID that might be stale.

Format / Example

# Agent Messenger Memory

## Discord Servers (Bot)

- `1234567890123456` — Acme Dev

## Bots (Acme Dev)

- `deploy` — Deploy Bot (active)
- `alert` — Alert Bot

## Channels (Acme Dev)

- `1111111111111111` — #general (General category)
- `2222222222222222` — #engineering (Engineering category)
- `3333333333333333` — #deploys (Engineering category)

## Users (Acme Dev)

- `4444444444444444` — Alice (server owner)
- `5555555555555555` — Bob

## Aliases

- "deploys" → `3333333333333333` (#deploys in Acme Dev)

## Notes

- Deploy Bot is used for CI/CD notifications
- Alert Bot is used for error monitoring

Memory lets you skip repeated channel list and server list calls. When you already know an ID from a previous session, use it directly.

Commands

Auth Commands

# Set bot token
agent-discordbot auth set \x3Ctoken>
agent-discordbot auth set \x3Ctoken> --bot deploy --name "Deploy Bot"

# Check auth status
agent-discordbot auth status

# Clear all credentials
agent-discordbot auth clear

# List stored bots
agent-discordbot auth list

# Switch active bot
agent-discordbot auth use \x3Cbot-id>

# Remove a stored bot
agent-discordbot auth remove \x3Cbot-id>

Server Commands

# List servers the bot is in
agent-discordbot server list

# Show current server
agent-discordbot server current

# Switch active server
agent-discordbot server switch \x3Cserver-id>

# Get server info
agent-discordbot server info \x3Cserver-id>

Message Commands

# Send a message
agent-discordbot message send \x3Cchannel-id> \x3Ccontent>
agent-discordbot message send 1234567890123456789 "Hello world"

# List messages
agent-discordbot message list \x3Cchannel-id>
agent-discordbot message list 1234567890123456789 --limit 50

# Get a single message by ID
agent-discordbot message get \x3Cchannel-id> \x3Cmessage-id>

# Get thread replies
agent-discordbot message replies \x3Cchannel-id> \x3Cmessage-id>
agent-discordbot message replies 1234567890123456789 9876543210987654321 --limit 50

# Update a message (bot's own messages only)
agent-discordbot message update \x3Cchannel-id> \x3Cmessage-id> \x3Cnew-content>

# Delete a message (bot's own messages only)
agent-discordbot message delete \x3Cchannel-id> \x3Cmessage-id> --force

Channel Commands

# List channels in current server
agent-discordbot channel list

# Get channel info
agent-discordbot channel info \x3Cchannel-id>
agent-discordbot channel info 1234567890123456789

User Commands

# List server members
agent-discordbot user list
agent-discordbot user list --limit 50

# Get user info
agent-discordbot user info \x3Cuser-id>

Reaction Commands

# Add reaction (use emoji name without colons)
agent-discordbot reaction add \x3Cchannel-id> \x3Cmessage-id> \x3Cemoji>
agent-discordbot reaction add 1234567890123456789 9876543210987654321 thumbsup

# Remove reaction
agent-discordbot reaction remove \x3Cchannel-id> \x3Cmessage-id> \x3Cemoji>

File Commands

# Upload file to a channel
agent-discordbot file upload \x3Cchannel-id> \x3Cpath>
agent-discordbot file upload 1234567890123456789 ./report.pdf

# List files in channel
agent-discordbot file list \x3Cchannel-id>

Thread Commands

# Create a thread from a message
agent-discordbot thread create \x3Cchannel-id> \x3Cname>
agent-discordbot thread create 1234567890123456789 "Discussion" --auto-archive-duration 1440

# Archive a thread
agent-discordbot thread archive \x3Cthread-id>

Snapshot Command

Get comprehensive server state for AI agents:

# Full snapshot of current server
agent-discordbot snapshot

# Filtered snapshots
agent-discordbot snapshot --channels-only
agent-discordbot snapshot --users-only

# Limit messages per channel
agent-discordbot snapshot --limit 10

Returns JSON with:

  • Server metadata (id, name)
  • Channels (id, name, type, topic)
  • Recent messages (id, content, author, timestamp)
  • Members (id, username, global_name)

Output Format

JSON (Default)

All commands output JSON by default for AI consumption:

{
  "id": "1234567890123456789",
  "content": "Hello world",
  "author": "bot-username",
  "timestamp": "2024-01-15T10:30:00.000Z"
}

Pretty (Human-Readable)

Use --pretty flag for formatted output:

agent-discordbot channel list --pretty

Global Options

Option Description
--pretty Human-readable output instead of JSON
--bot \x3Cid> Use a specific bot for this command
--server \x3Cid> Use a specific server for this command

Common Patterns

See references/common-patterns.md for typical AI agent workflows.

Templates

See templates/ directory for runnable examples:

  • post-message.sh - Send messages with error handling
  • monitor-channel.sh - Monitor channel for new messages
  • server-summary.sh - Generate server summary

Error Handling

All commands return consistent error format:

{
  "error": "No credentials. Run \"auth set\" first."
}

Common errors:

  • missing_token: No credentials configured
  • invalid_token: Token is invalid or expired
  • Missing Access: Bot lacks permission for this action
  • Unknown Channel: Invalid channel ID
  • Missing Permissions: Bot role doesn't have the required permission

Configuration

Credentials stored in: ~/.config/agent-messenger/discordbot-credentials.json

Format:

{
  "current": {
    "server_id": "1234567890123456789",
    "bot_id": "deploy"
  },
  "bots": {
    "deploy": {
      "bot_id": "deploy",
      "bot_name": "Deploy Bot",
      "token": "MTIz..."
    },
    "alert": {
      "bot_id": "alert",
      "bot_name": "Alert Bot",
      "token": "NDU2..."
    }
  },
  "servers": {
    "1234567890123456789": {
      "server_id": "1234567890123456789",
      "server_name": "My Server"
    }
  }
}

Security: File permissions set to 0600 (owner read/write only)

Key Differences from agent-discord

Feature agent-discord agent-discordbot
Token type User token Bot token
Token source Auto-extracted from desktop app Manual from Developer Portal
Message search Yes No
DMs Yes No
Mentions Yes No
Friends/Notes Yes No
Edit/delete messages Any message Bot's own messages only
File upload Yes Yes
Snapshot Yes Yes
CI/CD friendly Requires desktop app Yes (just set token)

Limitations

  • No real-time events / Gateway connection
  • No voice channel support
  • No server management (create/delete channels, roles)
  • No slash commands
  • No webhook support
  • No message search
  • No DMs or friend management
  • Bot can only edit/delete its own messages
  • Bot must be invited to the server and have appropriate permissions
  • Message Content intent required for verified bots (100+ servers)
  • Plain text messages only (no embeds in v1)

Troubleshooting

agent-discordbot: command not found

agent-discordbot is NOT the npm package name. The npm package is agent-messenger.

If the package is installed globally, use agent-discordbot directly:

agent-discordbot message send 1234567890123456789 "Hello"

If the package is NOT installed, use bunx agent-messenger discordbot:

bunx agent-messenger discordbot message send 1234567890123456789 "Hello"

NEVER run bunx agent-discordbot -- it will fail or install a wrong package since agent-discordbot is not the npm package name.

Bot can't read messages in large servers

Enable the Message Content Intent in the Developer Portal:

  1. Go to discord.com/developers/applications
  2. Select your application > Bot
  3. Enable Message Content Intent under Privileged Gateway Intents
  4. Save changes

This is required for verified bots (those in 100 or more servers).

"Missing Access" or "Missing Permissions"

The bot's role doesn't have the required permissions in that channel:

  1. Check the bot's role permissions in Server Settings > Roles
  2. Check channel-specific permission overrides
  3. Make sure the bot can see and send messages in the target channel

"Unknown Channel"

The channel ID is invalid, or the bot doesn't have access to it. Use channel list to find valid channel IDs.

Token expired or invalid

Bot tokens don't expire on their own, but they can be reset:

  1. Go to discord.com/developers/applications
  2. Select your application > Bot > Reset Token
  3. Copy the new token
  4. Run agent-discordbot auth set \x3Cnew-token>

References

Usage Guidance
This skill is internally consistent with its stated purpose, but review these before installing: 1) npm package trust: verify the agent-messenger package (publisher, source repo, checksums) before npm install. 2) Token storage: the CLI saves bot tokens in plaintext at ~/.config/agent-messenger/discordbot-credentials.json (docs recommend 0600). Treat that file like a secret and ensure proper permissions/backups. 3) Memory file access: the skill instructs the agent to read/write ~/.config/agent-messenger/MEMORY.md at the start of every task — confirm you are comfortable with an agent reading/writing that file and that you will not store sensitive data there. 4) Operational caution: run the CLI in a controlled environment (CI account or dedicated machine) if the bot tokens have broad permissions. If you need higher assurance, inspect the agent-messenger package source code (or its published repository) before use.
Capability Analysis
Type: OpenClaw Skill Name: agent-discordbot Version: 1.10.5 The skill bundle provides a legitimate CLI interface for interacting with Discord via bot tokens. It includes well-documented instructions for the AI agent to manage its own persistent memory (IDs and aliases) in `~/.config/agent-messenger/MEMORY.md` while explicitly forbidding the storage of sensitive credentials. The provided bash templates (`monitor-channel.sh`, `post-message.sh`, `server-summary.sh`) use standard tools like `jq` and follow the stated purpose of the skill without any signs of data exfiltration, obfuscation, or malicious execution.
Capability Assessment
Purpose & Capability
Name/description, required binary (agent-discordbot), node install (agent-messenger), and the shipped templates all align with a CLI-based Discord bot manager. The skill does not request unrelated cloud credentials or system-level access.
Instruction Scope
SKILL.md instructs the agent to read/write a persistent memory file (~/.config/agent-messenger/MEMORY.md) at the start/end of every task and to use Read/Write tools to manage it. That is coherent with the described multi-session memory feature but expands the agent's runtime scope to read and overwrite a user file in the home directory — a privacy-sensitive operation the user should be aware of.
Install Mechanism
Install is via an npm package (agent-messenger) which produces the declared binary. This is a typical, traceable mechanism (moderate risk compared to direct downloads) and no suspicious external URLs or archive extracts are used.
Credentials
The skill does not request environment variables, which matches expectations. However, the CLI stores bot tokens in plaintext at ~/.config/agent-messenger/discordbot-credentials.json (the docs say permissions 0600). Storing tokens in a local config file is expected for a CLI but is a sensitive behavior the user must accept — the skill explicitly warns not to put tokens into the memory file.
Persistence & Privilege
always is false and the skill does not request elevated or global agent privileges. It manages its own config and memory files under ~/.config/agent-messenger, not other skills' configs or system-wide settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-discordbot
  3. After installation, invoke the skill by name or use /agent-discordbot
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.10.5
- Updated version to 1.10.5 in SKILL.md. - No functional or documentation changes except the version bump.
v1.10.4
- Adds new documentation section on persistent agent memory using a `MEMORY.md` file. - Guides the agent to read from and write to `~/.config/agent-messenger/MEMORY.md` for storing friendly names and IDs of servers, channels, users, bots, and user preferences. - Specifies clear rules for what data to store (IDs, names, aliases) and what not to store (tokens, sensitive info, message contents). - Provides detailed best practices and formatting for memory management, ensuring more efficient repeated use across sessions. - No core command changes; all updates are documentation-focused.
v1.10.3
- Update version to 1.10.3 in SKILL.md. - No other content or feature changes.
v1.10.2
- Bumped version to 1.10.2. - SKILL.md updated; no changes to commands, features, or functionality.
v1.10.1
- Version bumped to 1.10.1 (from 1.10.0) in SKILL.md. - No functional or documentation changes besides the version update.
v1.10.0
agent-discordbot 1.10.0 - Updated SKILL.md version to 1.10.0. - No functional or usage changes; this release only updates documentation metadata.
v1.9.3
- Bumped version to 1.9.3 in SKILL.md. - No other content or functionality changes were made.
v1.9.2
- Version bump from 1.9.1 to 1.9.2 in SKILL.md. - No functional, API, or usage changes. - Documentation and metadata remain unchanged except for the version update.
v1.9.1
agent-discordbot 1.9.1 - Documentation update: SKILL.md now reflects version 1.9.1. - No command, API, or feature changes included; update is for metadata/version only.
v1.9.0
- Bumped version to 1.9.0 in SKILL.md. - No other functional or documentation changes.
v1.8.1
agent-discordbot 1.8.1 changelog: - Documentation update only: SKILL.md modified. - No changes to code or user-facing functionality. - Version bumped from 1.8.0 to 1.8.1.
v1.8.0
- Added comprehensive SKILL.md documentation with setup, authentication, permissions, and command usage details - Now supports multi-bot authentication and management, including switching and per-command overrides - Detailed descriptions for message, channel, reaction, file, thread, user, and snapshot commands - Improved error handling and JSON output format, with examples for common scenarios - Added support for human-readable output using --pretty flag - Includes references to common patterns and runnable templates for typical agent workflows
Metadata
Slug agent-discordbot
Version 1.10.5
License
All-time Installs 0
Active Installs 0
Total Versions 12
Frequently Asked Questions

What is Agent Discordbot?

Interact with Discord servers using bot tokens - send messages, read channels, manage reactions. It is an AI Agent Skill for Claude Code / OpenClaw, with 467 downloads so far.

How do I install Agent Discordbot?

Run "/install agent-discordbot" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Agent Discordbot free?

Yes, Agent Discordbot is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Agent Discordbot support?

Agent Discordbot is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Agent Discordbot?

It is built and maintained by Jeon Suyeol (@devxoul); the current version is v1.10.5.

💬 Comments