UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

63 lines (62 loc) • 2.34 kB
import { type RequestClient } from "@buape/carbon"; import { type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; import type { RetryConfig } from "openclaw/plugin-sdk/infra-runtime"; import type { PollInput } from "openclaw/plugin-sdk/media-runtime"; import { type DiscordSendComponents, type DiscordSendEmbeds } from "./send.shared.js"; import type { DiscordSendResult } from "./send.types.js"; type DiscordSendOpts = { cfg?: OpenClawConfig; token?: string; accountId?: string; mediaUrl?: string; filename?: string; mediaLocalRoots?: readonly string[]; verbose?: boolean; rest?: RequestClient; replyTo?: string; retry?: RetryConfig; components?: DiscordSendComponents; embeds?: DiscordSendEmbeds; silent?: boolean; }; export declare function sendMessageDiscord(to: string, text: string, opts?: DiscordSendOpts): Promise<DiscordSendResult>; type DiscordWebhookSendOpts = { cfg?: OpenClawConfig; webhookId: string; webhookToken: string; accountId?: string; threadId?: string | number; replyTo?: string; username?: string; avatarUrl?: string; wait?: boolean; }; export declare function sendWebhookMessageDiscord(text: string, opts: DiscordWebhookSendOpts): Promise<DiscordSendResult>; export declare function sendStickerDiscord(to: string, stickerIds: string[], opts?: DiscordSendOpts & { content?: string; }): Promise<DiscordSendResult>; export declare function sendPollDiscord(to: string, poll: PollInput, opts?: DiscordSendOpts & { content?: string; }): Promise<DiscordSendResult>; type VoiceMessageOpts = { cfg?: OpenClawConfig; token?: string; accountId?: string; verbose?: boolean; rest?: RequestClient; replyTo?: string; retry?: RetryConfig; silent?: boolean; }; /** * Send a voice message to Discord. * * Voice messages are a special Discord feature that displays audio with a waveform * visualization. They require OGG/Opus format and cannot include text content. * * @param to - Recipient (user ID for DM or channel ID) * @param audioPath - Path to local audio file (will be converted to OGG/Opus if needed) * @param opts - Send options */ export declare function sendVoiceMessageDiscord(to: string, audioPath: string, opts?: VoiceMessageOpts): Promise<DiscordSendResult>; export {};