docs(readme): document Discord allowChannels config field

Mention the new allowChannels field in the Discord config example and
add a TIP bullet explaining the empty-list default (respond in all
channels) and that it composes with allowFrom.

Made-with: Cursor
This commit is contained in:
Xubin Ren 2026-04-16 18:07:09 +00:00 committed by Xubin Ren
parent 459a4d7311
commit ddf2fe443e

View File

@ -403,6 +403,7 @@ If you prefer to configure manually, add the following to `~/.nanobot/config.jso
"enabled": true, "enabled": true,
"token": "YOUR_BOT_TOKEN", "token": "YOUR_BOT_TOKEN",
"allowFrom": ["YOUR_USER_ID"], "allowFrom": ["YOUR_USER_ID"],
"allowChannels": [],
"groupPolicy": "mention", "groupPolicy": "mention",
"streaming": true "streaming": true
} }
@ -415,6 +416,7 @@ If you prefer to configure manually, add the following to `~/.nanobot/config.jso
> - `"open"` — Respond to all messages > - `"open"` — Respond to all messages
> DMs always respond when the sender is in `allowFrom`. > DMs always respond when the sender is in `allowFrom`.
> - If you set group policy to open create new threads as private threads and then @ the bot into it. Otherwise the thread itself and the channel in which you spawned it will spawn a bot session. > - If you set group policy to open create new threads as private threads and then @ the bot into it. Otherwise the thread itself and the channel in which you spawned it will spawn a bot session.
> `allowChannels` restricts the bot to specific Discord channel IDs. Empty (default) means respond in every channel the bot can see. Example: `["1234567890", "0987654321"]`. The filter applies after `allowFrom`, so both must pass.
> `streaming` defaults to `true`. Disable it only if you explicitly want non-streaming replies. > `streaming` defaults to `true`. Disable it only if you explicitly want non-streaming replies.
**5. Invite the bot** **5. Invite the bot**