agentleFS
G1JoshiG1Joshi/Agent-Skills/skills/tools/discord/SKILL.md

discord

Skill15 starsChanged 43 days agoMITView on GitHub

Expert Discord API and bot development assistance covering Discord.js, slash commands, gateway intents, webhooks, and embeds. Use when building interactive Discord bots and notification integrations.

  • Reads credentials
  • Sends data out

34 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use taskflow-inbox-triage, voice-call and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AtomicBot-aiSkill

    taskflow-inbox-triage

    Also in 6 projects that use this

  • seedprodSkill

    voice-call

    Start voice calls via the OpenClaw voice-call plugin.

    Also in 17 projects that use this

  • seedprodSkill

    session-logs

    Search and analyze your own session logs (older/parent conversations) using jq.

    Also in 17 projects that use this

  • hkyutongSkill

    openclaw-release-maintainer

    Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.

    Also in 4 projects that use this

  • AtomicBot-aiSkill

    taskflow

    Also in 6 projects that use this

  • +7 more from seedprod

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 31 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use modern Application Slash Commands (/command) rather than legacy message prefix commands (!command).

    line 160

“Common” is measured: kept by at least 6 in 10 of the 31 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Discord

The Discord Developer Platform enables building interactive bots, webhook automations, slash commands, and embedded Activities inside Discord communities.

When to Use

  • Developer Community & Team Collaboration: Real-time voice, video, text chat, and automated notification channels.
  • Automated DevOps & CI/CD Webhooks: Posting build statuses, deployment alerts, and incident notifications to channels.
  • Interactive Bot & Slash Command Development: Building Discord applications with discord.js or discord.py.
  • Engineering Support & Incident War Rooms: Coordinating outage responses with integrated monitoring bots.

Quick Start

import { Client, GatewayIntentBits } from "discord.js";

const client = new Client({ intents: [GatewayIntentBits.Guilds] });

client.on("ready", () => {
  console.log(`Bot logged in as ${client.user.tag}!`);
});

client.on("interactionCreate", async (interaction) => {
  if (!interaction.isChatInputCommand()) return;
  if (interaction.commandName === "ping") {
    await interaction.reply("Pong!");
  }
});

client.login(process.env.DISCORD_TOKEN);

Core Concepts

Sending Automated Alerts via Incoming Webhook

Posting formatted embed messages from CI/CD pipelines using curl:

# Post structured deployment notification to Discord channel
curl -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "username": "Deployment Bot",
    "embeds": [
      {
        "title": "Production Deployment Succeeded",
        "description": "API service v2026.1.0 deployed to all edge regions.",
        "color": 65280,
        "fields": [
          {"name": "Commit", "value": "a1b2c3d", "inline": true},
          {"name": "Author", "value": "devops-team", "inline": true}
        ],
        "footer": {"text": "Antigravity CI/CD Pipeline"}
      }
    ]
  }' "$DISCORD_WEBHOOK_URL"

Discord Bot with Slash Commands (discord.py)

Building an interactive moderation or query bot:

import os
import discord
from discord import app_commands

intents = discord.Intents.default()
client = discord.Client(intents=intents)
tree = app_commands.CommandTree(client)

@tree.command(name="status", description="Query current infrastructure status")
async def status_command(interaction: discord.Interaction):
    await interaction.response.send_message("All systems operational. API latency: 24ms.", ephemeral=True)

@client.event
async def on_ready():
    await tree.sync()
    print(f"Logged in as {client.user} (Slash commands synchronized)")

# client.run(os.environ["DISCORD_BOT_TOKEN"])

Interactive Buttons & Select Menus (discord.js)

Handling UI component interactions:

import {
  Client,
  GatewayIntentBits,
  ButtonBuilder,
  ButtonStyle,
  ActionRowBuilder,
} from "discord.js";

const client = new Client({ intents: [GatewayIntentBits.Guilds] });

client.on("interactionCreate", async (interaction) => {
  if (
    interaction.isChatInputCommand() &&
    interaction.commandName === "deploy"
  ) {
    const confirm = new ButtonBuilder()
      .setCustomId("confirm_deploy")
      .setLabel("Confirm Production Release")
      .setStyle(ButtonStyle.Danger);

    const row = new ActionRowBuilder().addComponents(confirm);
    await interaction.reply({
      content: "Are you sure you want to deploy to production?",
      components: [row],
    });
  }
});

Common Patterns

Webhook Notification Delivery with Rich Embeds

Problem: Sending automated build or deployment notifications to Discord without running a persistent bot.

Solution: Post directly to incoming Discord Webhook:

async function sendDeployAlert(webhookUrl, deployInfo) {
  await fetch(webhookUrl, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      embeds: [
        {
          title: "🚀 Deployment Successful",
          color: 0x10b981,
          fields: [
            { name: "Environment", value: deployInfo.env, inline: true },
            { name: "Commit", value: deployInfo.commitHash, inline: true },
          ],
          timestamp: new Date().toISOString(),
        },
      ],
    }),
  });
}

Best Practices

Do:

  • Store Discord bot tokens and webhook URLs in secure environment variables, never in code.
  • Use modern Application Slash Commands (/command) rather than legacy message prefix commands (!command).
  • Set ephemeral=True for sensitive bot responses so they are visible only to the invoking user.
  • Specify only the exact Gateway Intents required by the bot to minimize memory and bandwidth.

Don't:

  • Expose webhook URLs publicly; anyone with the URL can post arbitrary messages to the channel.
  • Block the async event loop in bots; offload heavy computations or I/O with threads or queues.
  • Spam channels with noisy alert webhooks; aggregate and summarize notifications.

Troubleshooting

ErrorCauseSolution
Disallowed Intent: Privileged intent requestedBot requests MessageContent or GuildMembers without enabling in Developer Portal.Enable Privileged Gateway Intents in Discord Developer Portal > Bot tab.
DiscordAPIError[10062]: Unknown interactionBot took longer than 3 seconds to reply without deferring.Acknowledge immediately: await interaction.deferReply().
Invalid token providedDISCORD_TOKEN contains whitespace, quotes, or revoked token.Regenerate token in Developer Portal and set clean env var.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.