docs: clarify Discord bot mentions · openclaw/openclaw@52257fd
steipete
·
2026-05-04
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1320,6 +1320,29 @@ openclaw logs --follow
|
1320 | 1320 | If you set `channels.discord.allowBots=true`, use strict mention and allowlist rules to avoid loop behavior. |
1321 | 1321 | Prefer `channels.discord.allowBots="mentions"` to only accept bot messages that mention the bot. |
1322 | 1322 | |
| 1323 | +```json5 |
| 1324 | +{ |
| 1325 | + channels: { |
| 1326 | + discord: { |
| 1327 | + accounts: { |
| 1328 | + mantis: { |
| 1329 | +// Mantis listens to other bots only when they mention her. |
| 1330 | + allowBots: "mentions", |
| 1331 | + }, |
| 1332 | + molty: { |
| 1333 | +// Molty listens to all bot-authored Discord messages. |
| 1334 | + allowBots: true, |
| 1335 | + mentionAliases: { |
| 1336 | +// Lets Molty write "@Mantis" and send a real Discord mention. |
| 1337 | + Mantis: "MANTIS_DISCORD_USER_ID", |
| 1338 | + }, |
| 1339 | + }, |
| 1340 | + }, |
| 1341 | + }, |
| 1342 | + }, |
| 1343 | +} |
| 1344 | +``` |
| 1345 | + |
1323 | 1346 | </Accordion> |
1324 | 1347 | |
1325 | 1348 | <Accordion title="Voice STT drops with DecryptionFailed(...)"> |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -135,7 +135,7 @@ describe("discordPlugin outbound", () => {
|
135 | 135 | const hints = discordPlugin.agentPrompt?.messageToolHints?.({} as never) ?? []; |
136 | 136 | |
137 | 137 | expect(hints).toContain( |
138 | | -"- Discord mentions: use canonical outbound syntax: users `<@USER_ID>`, channels `<#CHANNEL_ID>`, and roles `<@&ROLE_ID>`. Do not use the legacy `<@!USER_ID>` nickname form.", |
| 138 | +"- Discord mentions: use canonical outbound syntax: users `<@USER_ID>`, channels `<#CHANNEL_ID>`, and roles `<@&ROLE_ID>`. Plain `@name` text only pings when a configured `mentionAliases` entry rewrites it; do not use the legacy `<@!USER_ID>` nickname form.", |
139 | 139 | ); |
140 | 140 | }); |
141 | 141 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -219,7 +219,7 @@ export const discordPlugin: ChannelPlugin<ResolvedDiscordAccount, DiscordProbe>
|
219 | 219 | }, |
220 | 220 | agentPrompt: { |
221 | 221 | messageToolHints: () => [ |
222 | | -"- Discord mentions: use canonical outbound syntax: users `<@USER_ID>`, channels `<#CHANNEL_ID>`, and roles `<@&ROLE_ID>`. Do not use the legacy `<@!USER_ID>` nickname form.", |
| 222 | +"- Discord mentions: use canonical outbound syntax: users `<@USER_ID>`, channels `<#CHANNEL_ID>`, and roles `<@&ROLE_ID>`. Plain `@name` text only pings when a configured `mentionAliases` entry rewrites it; do not use the legacy `<@!USER_ID>` nickname form.", |
223 | 223 | "- Discord components: set `components` when sending messages to include buttons, selects, or v2 containers.", |
224 | 224 | "- Forms: add `components.modal` (title, fields). OpenClaw adds a trigger button and routes submissions as new messages.", |
225 | 225 | ], |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。