@acedatacloud/skills 2026.621.1 → 2026.621.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acedatacloud/skills",
3
- "version": "2026.621.1",
3
+ "version": "2026.621.2",
4
4
  "description": "Agent Skills for AceDataCloud AI services — music, image, video generation, LLM chat, web search. Compatible with Claude Code, GitHub Copilot, Gemini CLI, OpenAI Codex, and 30+ AI coding agents.",
5
5
  "keywords": [
6
6
  "agent-skills",
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: discordbot
3
+ description: List channels, read recent messages, and send messages on Discord using the user's own bot, via the Discord REST API. Use when the user wants their Discord BOT to post a message, read a channel, or list servers/channels — anything that acts in a server the bot was invited to.
4
+ when_to_use: |
5
+ Trigger when the user wants to send, read, or list things on Discord
6
+ through their bot: list the servers/channels the bot can see, read recent
7
+ messages in a channel, or post / reply in a channel. Messages are sent as
8
+ the BOT, not the user's personal account, and only in servers the bot has
9
+ been invited to with the right permissions.
10
+ connections: [discordbot]
11
+ allowed_tools: [Bash]
12
+ license: Apache-2.0
13
+ metadata:
14
+ author: acedatacloud
15
+ version: "1.0"
16
+ ---
17
+
18
+ We drive the [Discord API](https://discord.com/developers/docs/reference)
19
+ with `curl + jq` using the user's **bot** token in `$DISCORDBOT_TOKEN`. The
20
+ auth header is `Authorization: Bot $DISCORDBOT_TOKEN` — note the literal
21
+ `Bot ` prefix (NOT `Bearer`). Base URL is `https://discord.com/api/v10`.
22
+
23
+ This acts as the user's registered **bot**, so it can only see and act in
24
+ servers (guilds) the bot has been **invited to** and only where it has the
25
+ relevant permission (View Channels / Send Messages / Read Message History).
26
+ A `403 Forbidden` (code 50001 "Missing Access" / 50013 "Missing
27
+ Permissions") almost always means the bot isn't in that server or lacks the
28
+ permission — tell the user to invite the bot or grant the permission rather
29
+ than retrying.
30
+
31
+ Errors are JSON `{"code": <n>, "message": "<reason>"}`. A `401` means the
32
+ bot token is wrong/reset — ask the user to re-paste it at
33
+ `auth.acedata.cloud/user/connections`. A `429` carries `retry_after`
34
+ (seconds) — sleep that long, then retry; never parallelize.
35
+
36
+ **Before sending a message, confirm the exact channel and content with the
37
+ user.** Sending is irreversible and public to that channel.
38
+
39
+ ## Recipes
40
+
41
+ ### Verify the bot (always run first)
42
+
43
+ ```sh
44
+ curl -sS -H "Authorization: Bot $DISCORDBOT_TOKEN" \
45
+ "https://discord.com/api/v10/users/@me" \
46
+ | jq '{id, username, bot}'
47
+ ```
48
+
49
+ ### List servers (guilds) the bot is in
50
+
51
+ ```sh
52
+ curl -sS -H "Authorization: Bot $DISCORDBOT_TOKEN" \
53
+ "https://discord.com/api/v10/users/@me/guilds" \
54
+ | jq 'map({id, name})'
55
+ ```
56
+
57
+ ### List text channels in a server
58
+
59
+ Channel `type` 0 = text, 5 = announcement; 2 = voice, 4 = category (skip
60
+ those for messaging). You need a guild id from the call above.
61
+
62
+ ```sh
63
+ GUILD_ID="123456789012345678"
64
+ curl -sS -H "Authorization: Bot $DISCORDBOT_TOKEN" \
65
+ "https://discord.com/api/v10/guilds/$GUILD_ID/channels" \
66
+ | jq 'map(select(.type==0 or .type==5) | {id, name, type})'
67
+ ```
68
+
69
+ ### Read recent messages in a channel
70
+
71
+ Reading message **content** requires the **Message Content Intent** to be
72
+ enabled on the bot (Developer Portal → Bot → Privileged Gateway Intents).
73
+ Without it, `content` comes back empty for messages that don't mention the
74
+ bot. Needs the *Read Message History* permission in that channel.
75
+
76
+ ```sh
77
+ CHANNEL_ID="123456789012345678"
78
+ curl -sS -H "Authorization: Bot $DISCORDBOT_TOKEN" \
79
+ "https://discord.com/api/v10/channels/$CHANNEL_ID/messages?limit=20" \
80
+ | jq 'map({author: .author.username, ts: .timestamp, content})'
81
+ ```
82
+
83
+ ### Send a message to a channel
84
+
85
+ ```sh
86
+ CHANNEL_ID="123456789012345678"
87
+ curl -sS -X POST \
88
+ -H "Authorization: Bot $DISCORDBOT_TOKEN" \
89
+ -H "Content-Type: application/json" \
90
+ "https://discord.com/api/v10/channels/$CHANNEL_ID/messages" \
91
+ -d "$(jq -nc --arg c "Hello from the bot." '{content: $c}')"
92
+ ```
93
+
94
+ ### Reply to a specific message
95
+
96
+ ```sh
97
+ CHANNEL_ID="123456789012345678"; MESSAGE_ID="987654321098765432"
98
+ curl -sS -X POST \
99
+ -H "Authorization: Bot $DISCORDBOT_TOKEN" \
100
+ -H "Content-Type: application/json" \
101
+ "https://discord.com/api/v10/channels/$CHANNEL_ID/messages" \
102
+ -d "$(jq -nc --arg c "On it!" --arg m "$MESSAGE_ID" \
103
+ '{content: $c, message_reference: {message_id: $m}}')"
104
+ ```
105
+
106
+ ## Notes
107
+
108
+ - A "server" in the UI is a "guild" in the API; messages live in channels
109
+ inside guilds. Always: list guilds → list that guild's channels → act on a
110
+ channel id. Don't invent ids.
111
+ - The bot only sees servers it was invited to. To add it: Developer Portal →
112
+ OAuth2 → URL Generator → scope `bot` + the permissions you need → open the
113
+ URL → pick a server (the user needs *Manage Server* there).
114
+ - This is a bot, not the user's account — it cannot read the user's DMs or
115
+ the user's full server list, only what the bot itself can access.
116
+ - Mentions: `<@USER_ID>` pings a user, `<#CHANNEL_ID>` links a channel. Plain
117
+ text is fine for normal messages.