skills/discord-community-growth-expert/skills/discord-auto-deploy/SKILL.md
Auto-deploy a Discord AI bot connected to OpenClaw Gateway. Handles Node.js bot setup, PM2 process management, and Gateway API integration. Use when the user has completed Discord Bot onboarding and needs the bot deployed and running.
npx skillsauth add giggle-official/skills discord-auto-deployInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill handles the full deployment of a Discord AI bot after onboarding is complete.
Load and follow this skill when:
onboarding_complete: true)When triggered, execute the following steps in order. Do not skip any step.
Read outputs/bot_config.json and extract:
server_idchannel_ids[0] (primary channel)token_provided (must be true)Also read discord-bot/.env to check if DISCORD_TOKEN is already set.
Run the following commands:
openclaw config set gateway.http.endpoints.chatCompletions.enabled true
Then restart the gateway:
openclaw gateway restart
Wait 5 seconds, then verify:
curl -s http://localhost:18789/v1/models \
-H "Authorization: Bearer $(cat ~/.openclaw/gateway-password.txt)"
Expected: JSON response containing openclaw/discord-community-growth-expert.
If verification fails, wait 5 more seconds and retry once.
Create the directory structure:
mkdir -p <workspace>/discord-bot
Where <workspace> is the agent workspace root.
Write the following files to discord-bot/:
package.json — use template at templates/package.json
.env — write with actual values:
DISCORD_TOKEN=<token_from_user>
DISCORD_CHANNEL_ID=<channel_id_from_config>
index.js — use template at templates/index.js
cd <workspace>/discord-bot
npm install discord.js dotenv
Stop any existing instance first:
npx pm2 delete discord-bot 2>/dev/null || true
Start fresh:
npx pm2 start index.js --name discord-bot
Enable auto-restart on system reboot:
npx pm2 startup 2>/dev/null || true
npx pm2 save
Wait 3 seconds, then check status:
npx pm2 list | grep discord-bot
Expected: status shows online.
Also check logs for startup confirmation:
npx pm2 logs discord-bot --lines 5 --nostream
Expected output includes:
✅ Bot 已上线: <bot-name>
📡 监听频道 ID: <channel-id>
Send this message (in user's language):
中文:
Bot 部署完成!🎉
现在去你的 Discord 服务器测试一下:
- 在配置的频道里发一条消息
- 或者 @你的 Bot
Bot 会用 AI 自动回复 👀
管理命令:
- 查看状态:
npx pm2 list- 查看日志:
npx pm2 logs discord-bot- 重启 Bot:
npx pm2 restart discord-bot- 停止 Bot:
npx pm2 stop discord-bot
English:
Bot deployed successfully! 🎉
Go test it in your Discord server:
- Send a message in the configured channel
- Or @mention your Bot
The Bot will reply automatically with AI 👀
Management commands:
- Check status:
npx pm2 list- View logs:
npx pm2 logs discord-bot- Restart:
npx pm2 restart discord-bot- Stop:
npx pm2 stop discord-bot
| Symptom | Cause | Fix |
|---------|-------|-----|
| Gateway API returns 404 | Endpoint not enabled | Re-run Step 2 |
| Bot status is errored in PM2 | Code or .env error | Check npx pm2 logs discord-bot --err |
| Bot online but no reply in Discord | Wrong Channel ID | Verify DISCORD_CHANNEL_ID in .env |
| Bot replies "抱歉,我现在有点忙" | AI call failed | Check Gateway is running: openclaw gateway status |
| Session lock timeout in logs | Concurrent requests | Wait 30s, run npx pm2 restart discord-bot |
| "Invalid token" error | Token wrong or expired | Get new token from Discord Developer Portal → Bot → Reset Token |
# Status
npx pm2 list
# Logs (live)
npx pm2 logs discord-bot
# Logs (errors only)
npx pm2 logs discord-bot --err
# Restart
npx pm2 restart discord-bot
# Stop
npx pm2 stop discord-bot
# Delete (full remove)
npx pm2 delete discord-bot
# Re-deploy from scratch
bash <workspace>/scripts/deploy-bot.sh
development
Social media publishing and engagement management via X2C Open API. Use when the user needs to publish posts to social media, check linked accounts, manage comments, or upload media. Use cases: (1) Publish text/media posts to TikTok, Instagram, Facebook, YouTube, LinkedIn, Twitter, etc. (2) Schedule posts for future publishing. (3) Manage comments and replies on posts. (4) Upload media files (up to 5GB) and get CDN links. (5) View post history and linked account status. Triggers: post to social media, publish post, social media, schedule post, social publish, upload media, social accounts, comment on post.
tools
Twitter automation core module for trend collection, auto first-reply posting, dashboard updates, comment failure checks, and installation verification.
testing
Use this feature when users want to generate videos, shoot short films, or view available video styles. Triggering keywords: short film, make video, shoot short film, short video, AI video, generate video from story, short drama, narrated video, cinematic video, available video styles.
development
全网热榜聚合 API 服务 — 基于 DailyHotApi 开源项目,本地自动部署,零配置获取 40+ 平台实时热搜数据。覆盖抖音、微博、知乎、B站、百度、今日头条、快手等主流平台。触发词:热点、热搜、趋势、热榜、trending、hot topics。