nc://channel-discord

v0.1.0Ships with Nodecode
Backnodecode-ai
pomterretools/nodecode-guard: a README -- the operator (2026-10-10), after Telegram's: "also for guard". Its page on nodecode.ai/cells had no About text. One file: what guard does and that it is a speed bump, not a boundary; turning it on (/setup's Recommended, `nodecode add guard`) and off (space in /cells, "enabled": false); the nine built-in rules as a table with an example each; how a call is read (the built-ins fire only when the same eval call starts a process, so a file that mentions sudo is still writable, and a call that both spawns and carries a risky command is refused); the refusal text the agent reads; the guard section's deny (id, pattern, reason, gated, ungated by default) and allow (exempts only what it covers), with an example; the keys; the tests. Every claim read off cell.lisp, the kernel's waist/textrules.lisp and the cell's tests at this commit; the header comment's "cells": ["nodecode-guard"] is no longer how a cell turns on, so the README does not repeat it.88bf4c7· 10 Oct1 commit
docs9 filesemoji3 filestest4 filesadapter.lisp38.9 KBconfig.example.jsonc5.7 KBdave.lisp14.0 KBgateway.lisp34.6 KBprobe.lisp13.8 KBrest.lisp46.0 KBvoice.lisp18.3 KBvoicelap.lisp69.6 KB

Discord

This cell puts Nodecode in a Discord server as a bot. People in the channels you allow can ask it for work, and it answers there with the same agent you run in the terminal: same tools, same models, same store.

By default each ask typed in a channel opens a thread off the asker's message, and the answer lands in that thread. Inside a thread the bot is part of, follow-ups need no mention. Direct messages work the same way. While a longer turn runs you see a card of its steps with Stop and Details buttons, and it stays above the answer as the turn's record.

The shared machinery (rooms, lanes, admission, the turn's card, slash commands) is the channel kit's, in ../kit/. This folder holds what is Discord's own: the gateway connection, the REST calls, the config section and voice.

Channel messages run with your machine's full authority. The bot refuses to start until you name who may talk to it.

Quick start

  1. In the developer portal, create an application, reset the bot token on its Bot page, and save the token to a file only you can read, for example ~/.nodecode/secrets/discord.token with mode 600.
  2. On the same page, turn on Message Content Intent (optional; see setup).
  3. Invite the bot with this URL, your application id in place:

    https://discord.com/oauth2/authorize?client_id=APPLICATION_ID&scope=bot+applications.commands&permissions=309237763136
  4. Install the cell: nodecode add channel-discord, or /setup in the terminal.
  5. Add a channels.discord section to ~/.nodecode/config.jsonc:

    {
      "channels": {
        "discord": {
          "bot_token_file": "/home/you/.nodecode/secrets/discord.token",
          "allowed_users": ["<your user id>"],
          "owner": ["<your user id>"]
        }
      }
    }

    Give the token file's absolute path. Or tell Nodecode "set up discord; the token is in /home/you/.nodecode/secrets/discord.token" and it writes the section with you.

  6. Restart the channels (the web page's Restart channels, or ask Nodecode to run (restart-cells)). /channels in the terminal should read discord: running, connected (degraded without Message Content).
  7. In a server channel, write @YourBot hello.

setup.md walks each step in full.

Guides

  • Setup: the application, the bot token, intents, permissions, the invite, installing, first run, checking the connection.
  • Rooms and access: who the bot listens to and where, mentions, direct messages, pairing, threads, the room record, catch-up after downtime, /new, agents and routes, the home channel.
  • Turns: what you see while the bot works: reactions, the card, Stop and Details, what the turn says on its way, the answer, long answers, pings, private replies, steering.
  • Commands: every slash command in the bot's menu, who may run it, and which answers are private.
  • Buttons and pickers: clarifying questions with their answers on buttons, and the /models picker.
  • Files: attachments the bot reads, files it posts, size limits.
  • Voice: answers as voice messages; joining a voice channel, following people, listening, speaking, meeting notes; Discord's end-to-end encryption (DAVE).
  • Configuration: every key of channels.discord, with type, default and effect.
  • Troubleshooting: the messages the bot and the terminal show when something is wrong, and what to change.

config.example.jsonc is a commented section to copy.

Testing

  • just channels-test: the kit's and the adapters' tests, in one image with no network.
  • just discord-qa (after just release): the built ./nodecode in a scratch home against a loopback Discord (gateway and REST, refusing what Discord refuses) and a scripted model. Each scenario says something in the server and checks what a person would then see: the thread and the reactions, the mention and stranger gates, an edit, long answers, a failed turn, Stop, question buttons, the /models picker, files both ways, every command in the menu, DM pairing, a resume and the catch-up after a restart, the note a new release says in the home channel, and the brief a restart that cut a turn off says there. just discord-qa --list names them; --only NAME,... runs some. It runs in the Linux CI workflow.

Add nc://channel-discord

  1. 1

    Install Nodecode

    Once per machine.

    $ curl -fsSL https://nodecode.ai/install.sh | sh
  2. 2

    Add the cell

    It ships with Nodecode, pinned at 88bf4c7; this turns it on. It brings channel-kit, which ships with Nodecode.

    $ nodecode add nc://channel-discord

    Or tell the agent add the channel discord cell.