mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-08 16:56:09 +00:00
20 lines
520 B
TypeScript
20 lines
520 B
TypeScript
import type { AgentRouteBinding } from "../config/types.js";
|
|
|
|
export function describeBinding(binding: AgentRouteBinding): string {
|
|
const match = binding.match;
|
|
const parts = [match.channel];
|
|
if (match.accountId) {
|
|
parts.push(`accountId=${match.accountId}`);
|
|
}
|
|
if (match.peer) {
|
|
parts.push(`peer=${match.peer.kind}:${match.peer.id}`);
|
|
}
|
|
if (match.guildId) {
|
|
parts.push(`guild=${match.guildId}`);
|
|
}
|
|
if (match.teamId) {
|
|
parts.push(`team=${match.teamId}`);
|
|
}
|
|
return parts.join(" ");
|
|
}
|