feat(discord): add replyToMessage parity with Telegram (#5800)

* feat(discord): add configurable native replies

* fix(discord): tolerate deleted reply targets
This commit is contained in:
ZedingZhang authored and GitHub committed 2026-09-18 15:13:31 +08:00
1 parent 4420ad58e1
commit ea9d13cbeb
15 files changed
+249 -28

No files matched your search

+3 -1
View File
@@ -298,7 +298,8 @@ If you prefer to configure manually, add the following to `~/.nanobot/config.jso
"allowFrom": ["YOUR_USER_ID"],
"allowChannels": [],
"groupPolicy": "mention",
"streaming": true
"streaming": true,
"replyToMessage": false
}
}
}
@@ -311,6 +312,7 @@ If you prefer to configure manually, add the following to `~/.nanobot/config.jso
> - 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. Discord threads under an allowed parent channel are also allowed; for Forum channels, allowing the parent Forum channel allows all threads/posts in that forum.
> `streaming` defaults to `true`. Disable it only if you explicitly want non-streaming replies.
> `replyToMessage` defaults to `false`. Enable it to use Discord's native reply UI for responses.
**5. Invite the bot**
- OAuth2 → URL Generator
+5 -1
View File
@@ -49,7 +49,8 @@ Merge this snippet into `~/.nanobot/config.json`:
"token": "YOUR_BOT_TOKEN",
"allowChannels": [],
"groupPolicy": "mention",
"streaming": true
"streaming": true,
"replyToMessage": false
}
}
}
@@ -60,6 +61,9 @@ first, get a pairing code, and be approved before using the bot in servers.
Invite the bot with permissions to read history and send messages.
Set `replyToMessage` to `true` to make responses use Discord's native reply UI.
It defaults to `false`, preserving the existing behavior.
## Run nanobot gateway
```bash