import { d as BaseConfig, b as ChatPayload } from "../../../packem_shared/types.d-C7l7qdMG.js"; import { a as ProviderFactory, P as Provider } from "../../../packem_shared/provider.d-Dh32nRm9.js"; import { l as ReceiverOptions, R as Receiver } from "../../../packem_shared/types.d-4T7bNo4x.js"; import "../../../packem_shared/types.d-BXfGenMH.js"; interface DiscordConfig extends BaseConfig { /** Override the bot username for the message. */ username?: string; /** Discord webhook URL. Required. */ webhookUrl: string; } /** * Discord chat provider via Incoming Webhooks. Edge-safe — `fetch` only. * @see https://discord.com/developers/docs/resources/webhook#execute-webhook */ declare const discordProvider$1: ProviderFactory; /** * Options for the Discord inbound receiver. */ interface DiscordReceiverOptions extends ReceiverOptions { /** * How long the handler may run before the interaction is deferred, in milliseconds. * * Discord discards an interaction whose endpoint does not answer within three seconds, so a * handler that outruns this deadline gets a `DEFERRED_CHANNEL_MESSAGE` sent on its behalf and * keeps running; its eventual reply has to go out through the Discord API (or `provider`). * @default 2000 */ deferAfterMs?: number; /** * The outbound Discord chat provider used by `context.reply()`, which posts a message to * the originating channel (use this instead of the deferred HTTP response). Optional. */ provider?: Provider; /** The application's Ed25519 public key (hex), from the Discord developer dashboard. */ publicKey: string; } /** * Creates a Discord inbound receiver for the interactions endpoint. Requests are verified * with Ed25519 (`X-Signature-Ed25519` over `timestamp + body`) before dispatch, and the * `PING` handshake is answered with a `PONG` automatically. * * A handler may return an {@link ../types.InboundReply} to respond with a channel message * (`CHANNEL_MESSAGE_WITH_SOURCE`); returning nothing defers the interaction * (`DEFERRED_CHANNEL_MESSAGE`), after which you follow up through the Discord API. * @param options Verification config, the message handler and an optional reply provider. * @returns The inbound channel. */ declare const createDiscordReceiver: (options: DiscordReceiverOptions) => Receiver; /** @deprecated Renamed to `createDiscordProvider`; removed in the next major. */ declare const discordProvider: typeof discordProvider$1; export { type DiscordConfig, type DiscordReceiverOptions, discordProvider$1 as createDiscordProvider, createDiscordReceiver, discordProvider };