Files
openclaw/extensions/discord/src/session-contract.ts
2026-04-04 00:10:16 +01:00

4 lines
191 B
TypeScript

export function deriveLegacySessionChatType(sessionKey: string): "channel" | undefined {
return /^discord:(?:[^:]+:)?guild-[^:]+:channel-[^:]+$/.test(sessionKey) ? "channel" : undefined;
}