xiongjingzhi/agent-learn/discord

Claude Code and agent skill by xiongjingzhi/agent-learn

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Discord Bot integration for sending messages, managing channels, and responding to events. Use when Bub needs to: (1) Send messages to Discord channels, (2) Create Discord bot with discord.py, (3) Handle Discord events (on_message, on_member_join, etc.), (4) Work with Discord webhooks, or (5) Any Discord-related functionality.

Install

npx vskill@latest install xiongjingzhi/agent-learn/discord

SKILL.md

Discord Bot Skill

Send messages and interact with Discord using discord.py.

Response Contract (Important)

When the user asks to send or draft a Discord message:

  • Return only the final message content intended for Discord.
  • Do not include action narration or meta text such as:
  • "I already prepared..."
  • "I can switch to another version..."
  • "If you want, I can..."
  • Do not prepend or append explanatory wrappers around the message body.
  • If a style is requested (short, technical, casual), apply it directly in the final message.
  • Keep the message concise unless the user explicitly requests detail.

Quick Start

bash
# Dependencies are declared in each script via PEP 723.
# Paths are relative to this skill directory.
# Run scripts directly with uv; it will resolve dependencies from the script header.
uv run ./scripts/discord_send.py --help
uv run ./scripts/discord_bot.py

Sending Messages

Basic Message
python
import discord
from discord.ext import commands
intents = discord.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix='!', intents=intents)
@bot.event
async def on_ready():
channel = bot.get_channel(CHANNEL_ID)
await channel.send("Hello from Bub!")
Send to Channel by ID
python
channel = bot.get_channel(123456789)
await channel.send("Message")
Send to Thread
python
thread = bot.get_channel(THREAD_ID)
await thread.send("Message in thread")
Embed Message
python
embed = discord.Embed(
title="Title",
description="Description",
color=discord.Color.blue()
)
embed.add_field(name="Field", value="Value")
await channel.send(embed=embed)

Using the Bot

Configuration

Set environment variable:

bash
export BUB_DISCORD_TOKEN="your_token_here"
Running the Bot
python
import asyncio
import os
from discord_bot import run_bot
async def main():
token = os.environ.get("BUB_DISCORD_TOKEN")
await run_bot(token)
asyncio.run(main())

Common Patterns

Respond to Messages
python
@bot.event
async def on_message(message):
if message.author.bot:
return
if "hello" in message.content.lower():
await message.reply("Hello!")
Command with Arguments
python
@bot.command(name="echo")
async def echo(ctx, *, text: str):
await ctx.send(text)
Button Interaction
python
from discord.ui import Button, View
button = Button(label="Click me", style=discord.ButtonStyle.primary)
async def callback(interaction):
await interaction.response.send_message("Clicked!")
button.callback = callback
view = View()
view.add_item(button)
await ctx.send("Click:", view=view)

Environment

  • BUB_DISCORD_TOKEN: Bot token from Discord Developer Portal

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/xiongjingzhi/agent-learn/discord/badge)](https://verified-skill.com/skills/xiongjingzhi/agent-learn/discord)

Something wrong with this skill or its page? Tell us.