Download src/cli/program/message/register.broadcast.ts from shimen/shinclaw: direct link, hf CLI and curl.
- Browser
- Download file 707 Bytes
-
https://huggingface.co/spaces/shimen/shinclaw/resolve/main/src/cli/program/message/register.broadcast.ts
- Command line
-
hf download hf://spaces/shimen/shinclaw/src/cli/program/message/register.broadcast.ts
-
curl -L -o register.broadcast.ts https://huggingface.co/spaces/shimen/shinclaw/resolve/main/src/cli/program/message/register.broadcast.ts
707 Bytes
| import type { Command } from "commander"; | |
| import type { MessageCliHelpers } from "./helpers.js"; | |
| import { CHANNEL_TARGETS_DESCRIPTION } from "../../../infra/outbound/channel-target.js"; | |
| export function registerMessageBroadcastCommand(message: Command, helpers: MessageCliHelpers) { | |
| helpers | |
| .withMessageBase( | |
| message.command("broadcast").description("Broadcast a message to multiple targets"), | |
| ) | |
| .requiredOption("--targets <target...>", CHANNEL_TARGETS_DESCRIPTION) | |
| .option("--message <text>", "Message to send") | |
| .option("--media <url>", "Media URL") | |
| .action(async (options: Record<string, unknown>) => { | |
| await helpers.runMessageAction("broadcast", options); | |
| }); | |
| } | |