docs: remove manual paragraph line wraps (#6131)

* docs: remove manual paragraph line wraps

* docs: preserve GitHub alert marker line breaks
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-10 11:48:50 +08:00
1 parent 36c36a1324
commit 50256940be
58 files changed
+848 -3130

No files matched your search

+7 -16
View File
@@ -1,7 +1,6 @@
# Build a Slack AI Agent with nanobot
This guide connects nanobot to Slack through Socket Mode. No public webhook URL
is required for the first working setup.
This guide connects nanobot to Slack through Socket Mode. No public webhook URL is required for the first working setup.
## What this guide builds
@@ -35,9 +34,7 @@ Install the optional channel dependency:
nanobot plugins enable slack
```
In Slack, create an app, enable Socket Mode, create an app-level token with
`connections:write`, add bot scopes, subscribe to bot events, and install the
app to your workspace.
In Slack, create an app, enable Socket Mode, create an app-level token with `connections:write`, add bot scopes, subscribe to bot events, and install the app to your workspace.
Merge this snippet into `~/.nanobot/config.json`:
@@ -57,9 +54,7 @@ Merge this snippet into `~/.nanobot/config.json`:
}
```
Slack DMs are open by default. Setting `dm.policy` to `"allowlist"` with no
`dm.allowFrom` entries makes new DM senders receive a pairing code. Approve the
code before using the bot normally.
Slack DMs are open by default. Setting `dm.policy` to `"allowlist"` with no `dm.allowFrom` entries makes new DM senders receive a pairing code. Approve the code before using the bot normally.
## Run nanobot gateway
@@ -70,8 +65,7 @@ nanobot gateway
## Test a message
DM the Slack bot directly. It should return a pairing code. Approve it from a
trusted local surface:
DM the Slack bot directly. It should return a pairing code. Approve it from a trusted local surface:
```bash
nanobot agent -m "/pairing approve ABCD-EFGH"
@@ -85,8 +79,7 @@ Then DM the bot again, or mention it in a channel:
## Security notes
- Keep `groupPolicy` as `mention` unless the bot is intentionally listening to
every channel message.
- Keep `groupPolicy` as `mention` unless the bot is intentionally listening to every channel message.
- Keep `dm.policy` as `"allowlist"` when you want pairing-based approval.
- Use `groupAllowFrom` with allowlist mode for approved channels.
- Reinstall the Slack app after changing scopes.
@@ -95,10 +88,8 @@ Then DM the bot again, or mention it in a channel:
## Troubleshooting
- If Socket Mode fails, confirm the app-level token starts with `xapp-`.
- If the bot cannot send files, add `files:write`, reinstall the app, and
restart nanobot.
- If a DM responds normally without pairing, check that `dm.policy` is
`"allowlist"`.
- If the bot cannot send files, add `files:write`, reinstall the app, and restart nanobot.
- If a DM responds normally without pairing, check that `dm.policy` is `"allowlist"`.
- If channel messages are ignored, check event subscriptions and group policy.
## Next: memory, automations, MCP tools