mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-21 10:16:44 +00:00
Adds a Discord Activities integration so an agent can show a self-contained HTML widget to Discord users, opened as a sandboxed Activity inside the client. Off by default: routes, the discord_widget tool, and the launch handler register only when channels.discord.activities is configured. OAuth identifies the user and gates on the account allowlist; widget lookup is capability- or instance-validated; token exchange is rate-limited; widget HTML runs in a no-network sandboxed iframe.
10 lines
527 B
TypeScript
10 lines
527 B
TypeScript
// Discord API module exposes the plugin public contract.
|
|
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/channel-plugin-common";
|
|
import { registerDiscordActivities as registerDiscordActivitiesImpl } from "./src/activities/register.js";
|
|
|
|
// Bundled entrypoints may not statically import ./src, so Activities registration
|
|
// is routed through this top-level barrel like the other Discord api surfaces.
|
|
export function registerDiscordActivities(api: OpenClawPluginApi): void {
|
|
registerDiscordActivitiesImpl(api);
|
|
}
|