Skip to content
nikcli
Docs
Documentation

Discord

Discord integration status, first-time setup, and the start/stop control.

Playground

Send these requests to your own running server. Values stay in this browser.

Not connected
How this works

Start a server with nikcli serve --hostname 127.0.0.1 --port 4096. Requests go straight from this page to that address — the browser allows it because loopback counts as a secure origin, and the server allows it because nikcli-ai.dev is in its CORS allowlist.

To try things without touching your real sessions or config, start the server with NIKCLI_TEST_HOME pointed at a throwaway directory — see the guided tour.

Operations

4 endpoints, generated from the server's own OpenAPI document. Every path also accepts the directory and workspace query parameters that select which instance handles the request.

get /discord discord.status
post /discord/setup discord.setup
post /discord/start discord.start
post /discord/stop discord.stop
get /discord # discord.status
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Responses
200 DiscordStatus application/json
{
  configured: boolean
  running: boolean
  username?: string
  clientId?: string
  inviteUrl?: string
  error?: string
}
Example response from schema
{
  "configured": false,
  "running": false,
  "username": "",
  "clientId": "",
  "inviteUrl": "",
  "error": ""
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
discord.status
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.discord.status({
  ...
})
Try it
post /discord/setup # discord.setup
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  botToken: string
}
Responses
200 DiscordSetupOutput application/json
{
  username: string
  clientId: string
  inviteUrl: string
}
400 DiscordValidationError application/json
{
  name: "ValidationError"
  data: { [key: string]: unknown }
}
Example response from schema
{
  "username": "",
  "clientId": "",
  "inviteUrl": ""
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
discord.setup
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.discord.setup({
  ...
})
Try it
post /discord/start # discord.start
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Responses
200 DiscordStartResult application/json
{
  running: boolean
  error?: string
}
Example response from schema
{
  "running": false,
  "error": ""
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
discord.start
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.discord.start({
  ...
})
Try it
post /discord/stop # discord.stop
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Responses
200 DiscordStopResult application/json
{
  stopped: boolean
}
Example response from schema
{
  "stopped": false
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
discord.stop
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.discord.stop({
  ...
})
Try it

Schemas

The 6 schemas reachable from these endpoints. Each is shown one level deep; nested types link to their own entry below. Names ending in _2, _3 and so on are the OpenAPI emitter disambiguating same-named schemas declared by different HttpApi groups — they are distinct shapes, not duplicates.

DiscordSetupInput
{
  botToken: string
}
DiscordSetupOutput
{
  username: string
  clientId: string
  inviteUrl: string
}
DiscordStartResult
{
  running: boolean
  error?: string
}
DiscordStatus
{
  configured: boolean
  running: boolean
  username?: string
  clientId?: string
  inviteUrl?: string
  error?: string
}
DiscordStopResult
{
  stopped: boolean
}
DiscordValidationError
{
  name: "ValidationError"
  data: { [key: string]: unknown }
}