-
-
Notifications
You must be signed in to change notification settings - Fork 69.6k
Discord: false positive 'unresolvedChannels' warning when using '*' wildcard in guild channels #32517
Copy link
Copy link
Closed
newtontech/openclaw-fork
#53Description
Summary
openclaw doctor and channels status --probe report a false positive when using the * wildcard in channels.discord.guilds.*.channels:
Some configured guild channels are not numeric IDs (unresolvedChannels=1).
Permission audit can only check numeric channel IDs.
The * key is a valid config meaning "allow all channels" in the guild. It is already handled correctly by the allowlist logic (e.g. provider.allowlist.ts filters key !== "*"). The audit should not count it as unresolved.
Config that triggers the warning
{
"channels": {
"discord": {
"guilds": {
"1478116902202114240": {
"channels": {
"*": { "allow": true }
}
}
}
}
}
}Root cause
In src/discord/audit.ts, collectDiscordAuditChannelIds counts all non-numeric keys as unresolved:
const channelIds = keys.filter((key) => /^\d+$/.test(key));
const unresolvedChannels = keys.length - channelIds.length;The * wildcard is not numeric, so it gets counted even though it is intentional and valid.
Suggested fix
Exclude known wildcard keys from the unresolved count:
const CHANNEL_WILDCARD_KEYS = new Set(["*"]);
// ...
const channelIds = keys.filter((key) => /^\d+$/.test(key));
const wildcardKeys = keys.filter((key) => CHANNEL_WILDCARD_KEYS.has(key));
const unresolvedChannels = Math.max(0, keys.length - channelIds.length - wildcardKeys.length);Environment
- OpenClaw 2026.3.1-beta.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.