refactor: trim discord helper exports

This commit is contained in:
Peter Steinberger
2026-05-01 19:31:50 +01:00
parent 439d8edf68
commit caf4fcbc60
3 changed files with 4 additions and 21 deletions

View File

@@ -1,25 +1,12 @@
import { ButtonStyle } from "discord-api-types/v10";
import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime";
import type {
ExecApprovalDecision,
ExecApprovalRequest,
ExecApprovalResolved,
PluginApprovalRequest,
PluginApprovalResolved,
} from "openclaw/plugin-sdk/approval-runtime";
import type { ExecApprovalDecision } from "openclaw/plugin-sdk/approval-runtime";
import type { DiscordExecApprovalConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-types";
import { Button, type ButtonInteraction, type ComponentData } from "../internal/discord.js";
export { buildExecApprovalCustomId } from "../approval-handler.runtime.js";
import { getDiscordExecApprovalApprovers } from "../exec-approvals.js";
export { extractDiscordChannelId } from "../approval-native.js";
export type {
ExecApprovalRequest,
ExecApprovalResolved,
PluginApprovalRequest,
PluginApprovalResolved,
} from "openclaw/plugin-sdk/approval-runtime";
function decodeCustomIdValue(value: string): string {
try {
return decodeURIComponent(value);

View File

@@ -6,11 +6,7 @@ import {
} from "openclaw/plugin-sdk/conversation-runtime";
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
export {
resolveThreadBindingIdleTimeoutMs,
resolveThreadBindingMaxAgeMs,
resolveThreadBindingsEnabled,
};
export { resolveThreadBindingsEnabled };
export function resolveDiscordThreadBindingIdleTimeoutMs(params: {
cfg: OpenClawConfig;

View File

@@ -11,7 +11,7 @@ import {
} from "openclaw/plugin-sdk/channel-secret-basic-runtime";
import { collectNestedChannelTtsAssignments } from "openclaw/plugin-sdk/channel-secret-tts-runtime";
export const secretTargetRegistryEntries = [
export const secretTargetRegistryEntries: SecretTargetRegistryEntry[] = [
{
id: "channels.discord.accounts.*.pluralkit.token",
targetType: "channels.discord.accounts.*.pluralkit.token",
@@ -80,7 +80,7 @@ export const secretTargetRegistryEntries = [
includeInAudit: true,
providerIdPathSegmentIndex: 4,
},
] satisfies SecretTargetRegistryEntry[];
];
export function collectRuntimeConfigAssignments(params: {
config: { channels?: Record<string, unknown> };