feat(discord): add group policy to control group respond behaviour

This commit is contained in:
Joel Chan
2026-02-12 17:10:50 +08:00
parent a5962170f6
commit e9d023f52c
3 changed files with 43 additions and 2 deletions

View File

@@ -293,12 +293,18 @@ If you prefer to configure manually, add the following to `~/.nanobot/config.jso
"discord": {
"enabled": true,
"token": "YOUR_BOT_TOKEN",
"allowFrom": ["YOUR_USER_ID"]
"allowFrom": ["YOUR_USER_ID"],
"groupPolicy": "mention"
}
}
}
```
> `groupPolicy` controls how the bot responds in group channels:
> - `"mention"` (default) — Only respond when @mentioned
> - `"open"` — Respond to all messages
> DMs always respond when the sender is in `allowFrom`.
**5. Invite the bot**
- OAuth2 → URL Generator
- Scopes: `bot`