picoclaw/pkg
Vernon Stinebaker 2fb2a733d4
feat(discord): add mention_only option for @-mention responses (#518)
* feat(discord): add mention_only option for @-mention responses

Add MentionOnly config option to Discord channel. When enabled, the bot
only responds when explicitly @-mentioned, useful for shared servers.

- Add MentionOnly bool field to DiscordConfig
- Store botUserID on startup for mention checking
- Check m.Mentions before processing messages when MentionOnly is true
- Update config example and README documentation

* fix(discord): resolve race condition and strip mention from content

- Get botUserID before opening session to avoid race condition
- Add stripBotMention to remove @mention from message content
- Handles both <@USER_ID> and <@!USER_ID> mention formats

* fix(discord): skip mention_only check for DMs

DMs should always be responded to regardless of mention_only setting.
Added check to skip the mention_only logic when GuildID is empty.

* Update README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Hua Audio <161028864+Huaaudio@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-20 12:18:37 +01:00
..
agent Feature: Implement Skill Discovery - With Clawhub Integration and Caching (#332) 2026-02-20 18:55:04 +08:00
auth feat: add manual callback URL entry for headless OAuth flow 2026-02-17 20:05:10 +05:30
bus Prevent panic on publish after MessageBus is closed (#223) 2026-02-16 15:04:25 +08:00
channels feat(discord): add mention_only option for @-mention responses (#518) 2026-02-20 12:18:37 +01:00
config feat(discord): add mention_only option for @-mention responses (#518) 2026-02-20 12:18:37 +01:00
constants refactor: replace bool map with set-style map for internal channels (#472) 2026-02-19 11:48:17 +01:00
cron fix: tighten file perms and enforce Slack ACL checks (#186) 2026-02-16 16:06:39 +08:00
devices feat: add device hotplug event notifications (USB on Linux) 2026-02-14 17:03:04 +08:00
health Add health check endpoints (/health and /ready) for container orchestration liveness and readiness probes. (#104) 2026-02-16 11:53:11 +08:00
heartbeat * fix: heartbeat/service_test.go test failed 2026-02-13 22:19:18 +08:00
logger * First commit 2026-02-09 19:20:19 +08:00
migrate Merge upstream main into feat/refactor-provider-by-protocol 2026-02-20 13:25:26 +08:00
providers chore: update Claude model references to claude-sonnet-4.6 2026-02-20 12:15:04 +08:00
routing feat: add multi-agent routing with declarative bindings 2026-02-13 12:12:33 -03:00
session Feat issue 183 (#189) 2026-02-16 16:30:54 +08:00
skills Feature: Implement Skill Discovery - With Clawhub Integration and Caching (#332) 2026-02-20 18:55:04 +08:00
state refactor(heartbeat): add configurable interval and channel-aware routing 2026-02-13 11:13:32 +08:00
tools Feature: Implement Skill Discovery - With Clawhub Integration and Caching (#332) 2026-02-20 18:55:04 +08:00
utils Feature: Implement Skill Discovery - With Clawhub Integration and Caching (#332) 2026-02-20 18:55:04 +08:00
voice Remove duplicate truncate functions, reuse utils.Truncate 2026-02-12 00:46:48 +08:00