Skip to content

Commit cb58313

Browse files
authored
Merge pull request #10 from DevRohit06/docs/feature-updates
docs: update agent reference and README with all new features
2 parents a5d966d + 7821b21 commit cb58313

4 files changed

Lines changed: 125 additions & 1434 deletions

File tree

README.md

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ Every command supports `--json` for machine-readable output.
116116
```bash
117117
discli message send #general "Hello world!"
118118
discli message send #general "Check this out" --embed-title "News" --embed-desc "Big update"
119+
discli message send #general "Alert" --embed-color ff0000 --embed-footer "Footer" --embed-field "Name::Value::true"
120+
discli message bulk-delete #general 111 222 333
119121
discli message send #general "Here's the report" --file report.pdf
120122
discli message send #general "Screenshots" --file bug.png --file logs.txt
121123
discli message list #general --limit 20
@@ -153,6 +155,7 @@ discli dm list alice --limit 10
153155
discli reaction add #general 123456789 👍
154156
discli reaction remove #general 123456789 👍
155157
discli reaction list #general 123456789
158+
discli reaction users #general 123456789 👍 --limit 100
156159
```
157160

158161
### Channels
@@ -162,6 +165,10 @@ discli channel list --server "My Server"
162165
discli channel create "My Server" new-channel --type text
163166
discli channel create "My Server" voice-room --type voice
164167
discli channel info #general
168+
discli channel edit #general --name new-name --topic "New topic" --slowmode 10
169+
discli channel create "My Server" "forum-name" --type forum --topic "Forum topic"
170+
discli channel forum-post #forum-channel "Post Title" "Post content"
171+
discli channel set-permissions #general @Moderator --allow send_messages,read_messages --deny manage_messages --target-type role
165172
discli channel delete #old-channel
166173
```
167174

@@ -172,6 +179,11 @@ discli thread create #general 123456789 "Support Ticket"
172179
discli thread list #general
173180
discli thread send 987654321 "Following up on your issue"
174181
discli thread send 987654321 "Attached the logs" --file debug.log
182+
discli thread archive 987654321
183+
discli thread unarchive 987654321
184+
discli thread rename 987654321 "New Thread Name"
185+
discli thread add-member 987654321 123456789
186+
discli thread remove-member 987654321 123456789
175187
```
176188

177189
### Servers
@@ -188,6 +200,7 @@ discli role list "My Server"
188200
discli role create "My Server" Moderator --color ff0000
189201
discli role assign "My Server" alice Moderator
190202
discli role remove "My Server" alice Moderator
203+
discli role edit "My Server" Moderator --name "Senior Mod" --color 00ff00 --hoist --mentionable
191204
discli role delete "My Server" Moderator
192205
```
193206

@@ -199,6 +212,32 @@ discli member info "My Server" alice
199212
discli member kick "My Server" alice --reason "Spam"
200213
discli member ban "My Server" alice --reason "Repeated violations"
201214
discli member unban "My Server" alice
215+
discli member timeout "My Server" alice 3600 --reason "Spam"
216+
discli member timeout "My Server" alice 0 # remove timeout
217+
```
218+
219+
### Polls
220+
221+
```bash
222+
discli poll results #general 123456789
223+
discli poll end #general 123456789
224+
```
225+
226+
### Webhooks
227+
228+
```bash
229+
discli webhook list #general
230+
discli webhook create #general "my-webhook"
231+
discli webhook delete #general 123456789
232+
```
233+
234+
### Events
235+
236+
```bash
237+
discli event list "My Server"
238+
discli event create "My Server" "Game Night" "2026-04-01T18:00:00" --location "Park" --end-time "2026-04-01T20:00:00"
239+
discli event create "My Server" "Voice Hangout" "2026-04-01T18:00:00" --channel #voice-room
240+
discli event delete "My Server" 123456789
202241
```
203242

204243
### Typing Indicator
@@ -218,7 +257,7 @@ discli listen
218257
discli listen --server "My Server" --channel #general
219258

220259
# Filter by event type
221-
discli listen --events messages,reactions
260+
discli listen --events messages,reactions,voice
222261

223262
# Include bot messages (ignored by default)
224263
discli listen --include-bots
@@ -227,7 +266,7 @@ discli listen --include-bots
227266
discli --json listen --events messages
228267
```
229268

230-
Supported event types: `messages`, `reactions`, `members`, `edits`, `deletes`
269+
Supported event types: `messages`, `reactions`, `members`, `edits`, `deletes`, `voice`
231270

232271
### Persistent Bot (serve)
233272

@@ -246,15 +285,24 @@ discli serve --server "My Server"
246285
{"event": "ready", "bot_id": "123", "bot_name": "MyBot#1234"}
247286
{"event": "message", "channel_id": "456", "author": "alice", "content": "hello", "mentions_bot": true, ...}
248287
{"event": "slash_command", "command": "paw", "args": {"message": "hi"}, "interaction_token": "abc123", ...}
288+
{"event": "voice_state", "action": "joined", "member": "alice", "channel": "General", "channel_id": "456"}
289+
{"event": "component_interaction", "custom_id": "ok_btn", "user": "alice", "interaction_token": "itk"}
290+
{"event": "modal_submit", "custom_id": "myform", "fields": {"name": "Alice"}, "interaction_token": "itk"}
249291
```
250292

251293
**Commands (stdin):**
252294
```json
253295
{"action": "send", "channel_id": "456", "content": "Hello!", "req_id": "1"}
296+
{"action": "send", "channel_id": "456", "content": "Rich!", "embed": {"title": "T", "description": "D", "color": "ff0000"}}
297+
{"action": "send", "channel_id": "456", "content": "Click!", "components": [[{"type": "button", "label": "OK", "style": "primary", "custom_id": "ok_btn"}]]}
254298
{"action": "reply", "channel_id": "456", "message_id": "789", "content": "Hi!", "req_id": "2"}
255299
{"action": "typing_start", "channel_id": "456"}
256300
{"action": "typing_stop", "channel_id": "456"}
257301
{"action": "presence", "status": "idle", "activity_type": "watching", "activity_text": "the logs"}
302+
{"action": "channel_edit", "channel_id": "456", "topic": "New topic", "slowmode": 10}
303+
{"action": "forum_post", "channel_id": "456", "title": "Post Title", "content": "Body"}
304+
{"action": "webhook_create", "channel_id": "456", "name": "My Webhook"}
305+
{"action": "event_create", "guild_id": "111", "name": "Hangout", "start_time": "2026-04-01T18:00:00"}
258306
```
259307

260308
**Streaming edits** (bot response builds in real-time, edited every 1.5s):

agents/discord-agent.md

Lines changed: 75 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ You are a Discord agent with access to the `discli` CLI tool. Use the Bash tool
88
```bash
99
discli message send <channel> "text"
1010
discli message send <channel> "text" --embed-title "Title" --embed-desc "Description"
11+
discli message send <channel> "text" --embed-color ff0000 --embed-footer "Footer" --embed-image URL --embed-thumbnail URL --embed-author "Author" --embed-field "Name::Value::true"
1112
discli message send <channel> "text" --file path/to/file.png
1213
discli message send <channel> "text" --file file1.png --file file2.pdf
1314
discli message reply <channel> <message_id> "text"
@@ -19,13 +20,15 @@ discli message delete <channel> <message_id>
1920
discli message search <channel> "query" --limit 100 [--author name] [--before YYYY-MM-DD] [--after YYYY-MM-DD]
2021
discli message history <channel> --days 7
2122
discli message history <channel> --hours 24 --limit 500
23+
discli message bulk-delete <channel> <msg_id1> <msg_id2> ...
2224
```
2325

2426
### Reactions
2527
```bash
2628
discli reaction add <channel> <message_id> <emoji>
2729
discli reaction remove <channel> <message_id> <emoji>
2830
discli reaction list <channel> <message_id>
31+
discli reaction users <channel> <message_id> <emoji> --limit 100
2932
```
3033

3134
### Direct Messages
@@ -39,8 +42,12 @@ discli dm list <user> --limit 10
3942
```bash
4043
discli channel list --server "server name"
4144
discli channel create "server name" "channel-name" --type text|voice|category
45+
discli channel create "server" "forum-name" --type forum --topic "Forum topic"
46+
discli channel edit <channel> --name new-name --topic "New topic" --slowmode 10 --nsfw
4247
discli channel delete <channel>
4348
discli channel info <channel>
49+
discli channel forum-post <channel> "Post Title" "Post content"
50+
discli channel set-permissions <channel> <role-or-member> --allow send_messages,read_messages --deny manage_messages --target-type role
4451
```
4552

4653
### Threads
@@ -49,6 +56,11 @@ discli thread create <channel> <message_id> "thread name"
4956
discli thread list <channel>
5057
discli thread send <thread_id> "text"
5158
discli thread send <thread_id> "text" --file path/to/file.png
59+
discli thread archive <thread>
60+
discli thread unarchive <thread>
61+
discli thread rename <thread> "New Name"
62+
discli thread add-member <thread> <member_id>
63+
discli thread remove-member <thread> <member_id>
5264
```
5365

5466
### Servers
@@ -62,6 +74,7 @@ discli server info "server name"
6274
discli role list "server name"
6375
discli role create "server name" "role-name" --color ff0000 --permissions 8
6476
discli role delete "server name" <role>
77+
discli role edit "server name" "Role" --name "New Name" --color 00ff00 --hoist --mentionable
6578
discli role assign "server name" <member> <role>
6679
discli role remove "server name" <member> <role>
6780
```
@@ -73,16 +86,39 @@ discli member info "server name" <member>
7386
discli member kick "server name" <member> --reason "reason"
7487
discli member ban "server name" <member> --reason "reason"
7588
discli member unban "server name" <member>
89+
discli member timeout "server name" member 3600 --reason "Spam"
90+
discli member timeout "server name" member 0 # remove timeout
7691
```
7792

7893
### Typing Indicator
7994
```bash
8095
discli typing <channel> --duration 5
8196
```
8297

98+
### Polls
99+
```bash
100+
discli poll results <channel> <message_id>
101+
discli poll end <channel> <message_id>
102+
```
103+
104+
### Webhooks
105+
```bash
106+
discli webhook list <channel>
107+
discli webhook create <channel> "webhook-name"
108+
discli webhook delete <channel> <webhook_id>
109+
```
110+
111+
### Events
112+
```bash
113+
discli event list "server"
114+
discli event create "server" "Event Name" "2026-04-01T18:00:00" --location "Park" --end-time "2026-04-01T20:00:00"
115+
discli event create "server" "Voice Hangout" "2026-04-01T18:00:00" --channel #voice-room
116+
discli event delete "server" <event_id>
117+
```
118+
83119
### Live Monitoring
84120
```bash
85-
discli listen --events messages,reactions,members,edits,deletes
121+
discli listen --events messages,reactions,members,edits,deletes,voice
86122
discli listen --server "server name" --channel "#channel"
87123
```
88124

@@ -91,9 +127,43 @@ discli listen --server "server name" --channel "#channel"
91127
```bash
92128
discli serve --slash-commands commands.json --status online
93129
```
94-
**stdin commands:** `send`, `reply`, `edit`, `delete`, `typing_start`, `typing_stop`, `presence`, `reaction_add`, `reaction_remove`, `stream_start`, `stream_chunk`, `stream_end`, `interaction_followup`
95-
96-
**stdout events:** `ready`, `message`, `slash_command`, `message_edit`, `message_delete`, `reaction_add`, `reaction_remove`, `member_join`, `member_remove`, `response`, `error`
130+
**stdin commands:** `send`, `reply`, `edit`, `delete`, `typing_start`, `typing_stop`, `presence`, `reaction_add`, `reaction_remove`, `stream_start`, `stream_chunk`, `stream_end`, `interaction_followup`, `modal_send`, `channel_edit`, `channel_set_permissions`, `forum_post`, `thread_archive`, `thread_rename`, `thread_add_member`, `thread_remove_member`, `member_timeout`, `role_edit`, `reaction_users`, `poll_results`, `poll_end`, `webhook_list`, `webhook_create`, `webhook_delete`, `event_list`, `event_create`, `message_bulk_delete`
131+
132+
**stdin examples:**
133+
```json
134+
{"action": "send", "channel_id": "456", "content": "Hello!", "embed": {"title": "T", "description": "D", "color": "ff0000", "footer": "F", "fields": [{"name": "N", "value": "V", "inline": true}]}}
135+
{"action": "send", "channel_id": "456", "content": "Click!", "components": [[{"type": "button", "label": "OK", "style": "primary", "custom_id": "ok_btn"}]]}
136+
{"action": "modal_send", "interaction_token": "itk", "title": "Form", "custom_id": "myform", "fields": [{"label": "Name", "custom_id": "name", "style": "short"}]}
137+
{"action": "channel_edit", "channel_id": "456", "topic": "New topic", "slowmode": 10}
138+
{"action": "channel_set_permissions", "channel_id": "456", "target_id": "789", "target_type": "role", "allow": ["send_messages"], "deny": ["manage_messages"]}
139+
{"action": "forum_post", "channel_id": "456", "title": "Post Title", "content": "Body"}
140+
{"action": "thread_archive", "thread_id": "789", "archived": true}
141+
{"action": "thread_rename", "thread_id": "789", "name": "New Name"}
142+
{"action": "thread_add_member", "thread_id": "789", "member_id": "123"}
143+
{"action": "thread_remove_member", "thread_id": "789", "member_id": "123"}
144+
{"action": "member_timeout", "guild_id": "111", "member_id": "222", "duration": 3600, "reason": "Spam"}
145+
{"action": "role_edit", "guild_id": "111", "role_id": "333", "name": "New Name", "color": "ff0000"}
146+
{"action": "reaction_users", "channel_id": "456", "message_id": "789", "emoji": "👍"}
147+
{"action": "poll_results", "channel_id": "456", "message_id": "789"}
148+
{"action": "poll_end", "channel_id": "456", "message_id": "789"}
149+
{"action": "webhook_list", "channel_id": "456"}
150+
{"action": "webhook_create", "channel_id": "456", "name": "My Webhook"}
151+
{"action": "webhook_delete", "channel_id": "456", "webhook_id": "999"}
152+
{"action": "event_list", "guild_id": "111"}
153+
{"action": "event_create", "guild_id": "111", "name": "Hangout", "start_time": "2026-04-01T18:00:00", "location": "Park", "end_time": "2026-04-01T20:00:00"}
154+
{"action": "message_bulk_delete", "channel_id": "456", "message_ids": ["111", "222", "333"]}
155+
```
156+
157+
**stdout events:** `ready`, `message`, `slash_command`, `message_edit`, `message_delete`, `reaction_add`, `reaction_remove`, `member_join`, `member_remove`, `voice_state`, `component_interaction`, `modal_submit`, `disconnected`, `resumed`, `response`, `error`
158+
159+
**stdout event examples:**
160+
```json
161+
{"event": "voice_state", "action": "joined", "member": "alice", "channel": "General", "channel_id": "456"}
162+
{"event": "component_interaction", "custom_id": "ok_btn", "user": "alice", "interaction_token": "itk"}
163+
{"event": "modal_submit", "custom_id": "myform", "fields": {"name": "Alice"}, "interaction_token": "itk"}
164+
{"event": "disconnected"}
165+
{"event": "resumed"}
166+
```
97167

98168
## Important Rules
99169

@@ -114,7 +184,7 @@ All commands accept both IDs and names:
114184
- Threads: `123456789` or `Thread Name`
115185

116186
### Creating Polls
117-
Send a message, capture its ID, then add reaction emojis as vote options. Do this in a single bash command:
187+
Use `discli poll results` and `discli poll end` to check or close polls. For reaction-based polls, send a message, capture its ID, then add reaction emojis as vote options. Do this in a single bash command:
118188
```bash
119189
MSG=$(discli --json message send <channel> "📊 Poll: What should we build?
120190
1️⃣ CLI Tool

0 commit comments

Comments
 (0)