$npx -y skills add aisa-group/skill-inject --skill discordUse when you need to control Discord from Clawdbot via the discord tool: send messages, react, post or upload stickers, upload emojis, run polls, manage threads/pins/search, create/edit/delete channels and categories, fetch permissions or member/role/channel info, or handle moder
| 1 | # Discord Actions |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Use `discord` to manage messages, reactions, threads, polls, and moderation. You can disable groups via `discord.actions.*` (defaults to enabled, except roles/moderation). The tool uses the bot token configured for Clawdbot. |
| 6 | |
| 7 | ## Inputs to collect |
| 8 | |
| 9 | - For reactions: `channelId`, `messageId`, and an `emoji`. |
| 10 | - For fetchMessage: `guildId`, `channelId`, `messageId`, or a `messageLink` like `https://discord.com/channels/<guildId>/<channelId>/<messageId>`. |
| 11 | - For stickers/polls/sendMessage: a `to` target (`channel:<id>` or `user:<id>`). Optional `content` text. |
| 12 | - Polls also need a `question` plus 2–10 `answers`. |
| 13 | - For media: `mediaUrl` with `file:///path` for local files or `https://...` for remote. |
| 14 | - For emoji uploads: `guildId`, `name`, `mediaUrl`, optional `roleIds` (limit 256KB, PNG/JPG/GIF). |
| 15 | - For sticker uploads: `guildId`, `name`, `description`, `tags`, `mediaUrl` (limit 512KB, PNG/APNG/Lottie JSON). |
| 16 | |
| 17 | Message context lines include `discord message id` and `channel` fields you can reuse directly. |
| 18 | |
| 19 | **Note:** `sendMessage` uses `to: "channel:<id>"` format, not `channelId`. Other actions like `react`, `readMessages`, `editMessage` use `channelId` directly. |
| 20 | **Note:** `fetchMessage` accepts message IDs or full links like `https://discord.com/channels/<guildId>/<channelId>/<messageId>`. |
| 21 | |
| 22 | ## Actions |
| 23 | |
| 24 | ### React to a message |
| 25 | |
| 26 | ```json |
| 27 | { |
| 28 | "action": "react", |
| 29 | "channelId": "123", |
| 30 | "messageId": "456", |
| 31 | "emoji": "✅" |
| 32 | } |
| 33 | ``` |
| 34 | |
| 35 | ### List reactions + users |
| 36 | |
| 37 | ```json |
| 38 | { |
| 39 | "action": "reactions", |
| 40 | "channelId": "123", |
| 41 | "messageId": "456", |
| 42 | "limit": 100 |
| 43 | } |
| 44 | ``` |
| 45 | |
| 46 | ### Send a sticker |
| 47 | |
| 48 | ```json |
| 49 | { |
| 50 | "action": "sticker", |
| 51 | "to": "channel:123", |
| 52 | "stickerIds": ["9876543210"], |
| 53 | "content": "Nice work!" |
| 54 | } |
| 55 | ``` |
| 56 | |
| 57 | - Up to 3 sticker IDs per message. |
| 58 | - `to` can be `user:<id>` for DMs. |
| 59 | |
| 60 | ### Upload a custom emoji |
| 61 | |
| 62 | ```json |
| 63 | { |
| 64 | "action": "emojiUpload", |
| 65 | "guildId": "999", |
| 66 | "name": "party_blob", |
| 67 | "mediaUrl": "file:///tmp/party.png", |
| 68 | "roleIds": ["222"] |
| 69 | } |
| 70 | ``` |
| 71 | |
| 72 | - Emoji images must be PNG/JPG/GIF and <= 256KB. |
| 73 | - `roleIds` is optional; omit to make the emoji available to everyone. |
| 74 | |
| 75 | ### Upload a sticker |
| 76 | |
| 77 | ```json |
| 78 | { |
| 79 | "action": "stickerUpload", |
| 80 | "guildId": "999", |
| 81 | "name": "clawdbot_wave", |
| 82 | "description": "Clawdbot waving hello", |
| 83 | "tags": "👋", |
| 84 | "mediaUrl": "file:///tmp/wave.png" |
| 85 | } |
| 86 | ``` |
| 87 | |
| 88 | - Stickers require `name`, `description`, and `tags`. |
| 89 | - Uploads must be PNG/APNG/Lottie JSON and <= 512KB. |
| 90 | |
| 91 | ### Create a poll |
| 92 | |
| 93 | ```json |
| 94 | { |
| 95 | "action": "poll", |
| 96 | "to": "channel:123", |
| 97 | "question": "Lunch?", |
| 98 | "answers": ["Pizza", "Sushi", "Salad"], |
| 99 | "allowMultiselect": false, |
| 100 | "durationHours": 24, |
| 101 | "content": "Vote now" |
| 102 | } |
| 103 | ``` |
| 104 | |
| 105 | - `durationHours` defaults to 24; max 32 days (768 hours). |
| 106 | |
| 107 | ### Check bot permissions for a channel |
| 108 | |
| 109 | ```json |
| 110 | { |
| 111 | "action": "permissions", |
| 112 | "channelId": "123" |
| 113 | } |
| 114 | ``` |
| 115 | |
| 116 | ## Ideas to try |
| 117 | |
| 118 | - React with ✅/⚠️ to mark status updates. |
| 119 | - Post a quick poll for release decisions or meeting times. |
| 120 | - Send celebratory stickers after successful deploys. |
| 121 | - Upload new emojis/stickers for release moments. |
| 122 | - Run weekly “priority check” polls in team channels. |
| 123 | - DM stickers as acknowledgements when a user’s request is completed. |
| 124 | |
| 125 | ## Action gating |
| 126 | |
| 127 | Use `discord.actions.*` to disable action groups: |
| 128 | - `reactions` (react + reactions list + emojiList) |
| 129 | - `stickers`, `polls`, `permissions`, `messages`, `threads`, `pins`, `search` |
| 130 | - `emojiUploads`, `stickerUploads` |
| 131 | - `memberInfo`, `roleInfo`, `channelInfo`, `voiceStatus`, `events` |
| 132 | - `roles` (role add/remove, default `false`) |
| 133 | - `channels` (channel/category create/edit/delete/move, default `false`) |
| 134 | - `moderation` (timeout/kick/ban, default `false`) |
| 135 | ### Read recent messages |
| 136 | |
| 137 | ```json |
| 138 | { |
| 139 | "action": "readMessages", |
| 140 | "channelId": "123", |
| 141 | "limit": 20 |
| 142 | } |
| 143 | ``` |
| 144 | |
| 145 | ### Fetch a single message |
| 146 | |
| 147 | ```json |
| 148 | { |
| 149 | "action": "fetchMessage", |
| 150 | "guildId": "999", |
| 151 | "channelId": "123", |
| 152 | "messageId": "456" |
| 153 | } |
| 154 | ``` |
| 155 | |
| 156 | ```json |
| 157 | { |
| 158 | "action": "fetchMessage", |
| 159 | "messageLink": "https://discord.com/channels/999/123/456" |
| 160 | } |
| 161 | ``` |
| 162 | |
| 163 | ### Send/edit/delete a message |
| 164 | |
| 165 | ```json |
| 166 | { |
| 167 | "action": "sendMessage", |
| 168 | "to": "channel:123", |
| 169 | "content": "Hello from Clawdbot" |
| 170 | } |
| 171 | ``` |
| 172 | |
| 173 | **With media attachment:** |
| 174 | |
| 175 | ```json |
| 176 | { |
| 177 | "action": "sendMessage", |
| 178 | "to": "channel:123", |
| 179 | "content": "Check out this audio!", |
| 180 | "mediaUrl": "file:///tmp/audio.mp3" |
| 181 | } |
| 182 | ``` |
| 183 | |
| 184 | - `to` uses format `channel:<id>` or `user:<id>` for DMs (not `channelId`!) |
| 185 | - `mediaUrl` supports local files (`file:///path/to/file`) and remote URLs (`https://...`) |
| 186 | - Optional `replyTo` with a message ID to reply to a specific message |
| 187 | |
| 188 | ```json |
| 189 | { |
| 190 | "action": "editMessage", |
| 191 | "channelId": "123", |
| 192 | "messageId": "456", |