feat(agentctl): guild slash headless helpers (Phase 538)
Expose registerGuildSlashCommands, deleteGuildSlashCommand, and executeGuildSlashCommand for slash automation and document phase538 bundle. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -17,6 +17,8 @@ Both modes use **`pearcord-ui-flow` `dispatchUiMessage`** — the same handler a
|
||||
|
||||
`AgentClient` resolves RPC replies before treating `{ event: "state" | "sidecar" }` push lines as events (fixes `wait-event` responses that include an `event` field).
|
||||
|
||||
**v0.8.501 (Phase 538):** Headless `registerGuildSlashCommands`/`deleteGuildSlashCommand`/`executeGuildSlashCommand` for slash automation. Bundle: `npm run test:agentctl-phase538-slash` (chains `test:agentctl-phase489-slash`).
|
||||
|
||||
**v0.8.500 (Phase 537):** Headless `createGuildChannelWebhook`/`deleteGuildChannelWebhook`/`executeGuildChannelWebhook` for webhook automation. Bundle: `npm run test:agentctl-phase537-webhooks` (chains `test:agentctl-phase488-webhooks`).
|
||||
|
||||
**v0.8.499 (Phase 536):** Headless `exportGuildAuditLog(opts)` wraps `platform.exportAuditLog` for compliance automation. Bundle: `npm run test:agentctl-phase536-compliance` (chains `test:agentctl-phase487-compliance`).
|
||||
|
||||
+21
@@ -655,6 +655,27 @@ class HeadlessSession {
|
||||
return msg
|
||||
}
|
||||
|
||||
async registerGuildSlashCommands (commands) {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
const rows = await this.platform.registerSlashCommands(commands)
|
||||
await this.refreshView()
|
||||
return rows
|
||||
}
|
||||
|
||||
async deleteGuildSlashCommand (name) {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
const removed = await this.platform.deleteSlashCommand(name)
|
||||
await this.refreshView()
|
||||
return removed
|
||||
}
|
||||
|
||||
async executeGuildSlashCommand (content, opts = {}) {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
const msg = await this.platform.executeSlashCommand(content, opts)
|
||||
await this.refreshView()
|
||||
return msg
|
||||
}
|
||||
|
||||
async banGuildMember (userId, reason) {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
const ban = await this.platform.banMember({ userId, reason })
|
||||
|
||||
Reference in New Issue
Block a user