import { Button, type ButtonInteraction, type ComponentData } from "@buape/carbon"; import { ButtonStyle } from "discord-api-types/v10"; import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime"; import type { DiscordExecApprovalConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; import type {
ExecApprovalDecision,
ExecApprovalRequest,
ExecApprovalResolved,
PluginApprovalRequest,
PluginApprovalResolved,
} from "openclaw/plugin-sdk/infra-runtime";
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/infra-runtime";
const ok = await this.ctx.resolveApproval(parsed.approvalId, parsed.action); if (!ok) { try {
await interaction.followUp({
content: `Failed to submit approval decision for **${decisionLabel}**. The request may have expired or already been resolved.`,
ephemeral: true,
});
} catch {}
}
}
}
export function createExecApprovalButton(ctx: ExecApprovalButtonContext): Button { returnnew ExecApprovalButton(ctx);
}
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.