import type { OpenClawPluginApi } from "openclaw/plugin-sdk/channel-plugin-common"; import {
normalizeOptionalLowercaseString,
normalizeOptionalStringifiedId,
} from "openclaw/plugin-sdk/text-runtime"; import { resolveDiscordAccount } from "./accounts.js"; import {
autoBindSpawnedDiscordSubagent,
listThreadBindingsBySessionKey,
type ThreadBindingTargetKind,
unbindThreadBindingsBySessionKey,
} from "./monitor/thread-bindings.js";
function summarizeError(err: unknown): string { if (err instanceof Error) { return err.message;
} if (typeof err === "string") { return err;
} return"error";
}
let binding: (typeof bindings)[number] | undefined; if (requesterThreadId) {
binding = bindings.find((entry) => { if (entry.threadId !== requesterThreadId) { returnfalse;
} if (requesterAccountId && entry.accountId !== requesterAccountId) { returnfalse;
} returntrue;
});
} if (!binding && bindings.length === 1) {
binding = bindings[0];
} if (!binding) { return undefined;
} return {
origin: {
channel: "discord" as const,
accountId: binding.accountId,
to: `channel:${binding.threadId}`,
threadId: binding.threadId,
},
};
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.20Bemerkung:
(vorverarbeitet am 2026-06-09)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.