openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
25 lines (24 loc) • 842 B
TypeScript
import { type DmGroupAccessDecision } from "openclaw/plugin-sdk/security-runtime";
import { resolveDiscordAllowListMatch } from "./allow-list.js";
export type DiscordDmPolicy = "open" | "pairing" | "allowlist" | "disabled";
export type DiscordDmCommandAccess = {
decision: DmGroupAccessDecision;
reason: string;
commandAuthorized: boolean;
allowMatch: ReturnType<typeof resolveDiscordAllowListMatch> | {
allowed: false;
};
};
export declare function resolveDiscordDmCommandAccess(params: {
accountId: string;
dmPolicy: DiscordDmPolicy;
configuredAllowFrom: string[];
sender: {
id: string;
name?: string;
tag?: string;
};
allowNameMatching: boolean;
useAccessGroups: boolean;
readStoreAllowFrom?: () => Promise<string[]>;
}): Promise<DiscordDmCommandAccess>;