Skip to content
AI & Agents
Skill

/agent-discordbot

Interact with Discord servers using bot tokens - send messages, read channels, manage reactions

From plugin
agent-messenger
17118 skills
Install
$ npx -y skills add agent-messenger/agent-messenger --skill agent-discordbot --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/agent-discordbot

Context preview

The summary Claude sees to decide when to auto-load this skill.

Interact with Discord servers using bot tokens - send messages, read channels, manage reactions

SKILL.md

agent-discordbot.SKILL.md
name: agent-discordbot
description: Interact with Discord servers using bot tokens - send messages, read channels, manage reactions
version: 2.36.0
allowed-tools: Bash(agent-discordbot:*)
metadata:
  openclaw:
    requires:
      bins:
        - agent-discordbot
    install:
      - kind: node
        package: agent-messenger
        bins: [agent-discordbot]

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.

Key Concepts

Before diving in, a few things about Discord Bot integration:

  • **Bot tokens** — Issued from the Discord Developer Portal (discord.com/developers/applications). Bots act as the bot application's user, with their own ID and presence.
  • **Server (Guild) preference** — A bot can be in many servers. Use `server switch <id>` to set the active server, or pass `--server <id>` per command.
  • **Privileged intents** — `MessageContent`, `GuildMembers`, and `GuildPresences` are privileged and must be enabled in the Developer Portal before they can be used by the SDK listener.
  • **Permission gates** — Bot capabilities depend on the role's permission flags in each server. Missing permissions return 403 errors.
  • **Real-time events** — Available via the SDK's Gateway listener, not via the CLI.
  • **Channel resolution** — Use channel IDs (snowflake numbers) directly. The CLI does not resolve `#channel-name` syntax.

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

For bot token setup, server invite flow, Message Content Intent, and multi-bot management, see [references/authentication.md](references/authentication.md).

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 <token>
agent-discordbot auth set <token> --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 <bot-id>

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

Whoami Command

# Show current authenticated bot
agent-discordbot whoami
agent-discordbot whoami --pretty
agent-discordbot whoami --bot <bot-id>

Server Commands

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

# Show current server
agent-discor
Read more
Ships withagent-messenger

Your agent messages as you — not as a bot One CLI for Slack, Discord, Teams, Webex, Telegram, WhatsApp, LINE, WeChat, iMessage, Instagram, KakaoTalk, and Channel Talk.

Get the whole plugin
Stats
180
Stars
29
Forks
Active
Maintenance
TypeScript
Language
4d ago
Last commit
6mo ago
Created

Repo: agent-messenger/agent-messenger