Download src/cli/program/message/register.emoji-sticker.ts from SaylorTwift/openclaw: direct link, hf CLI and curl.
- Browser
- Download file 2.17 kB
-
https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/cli/program/message/register.emoji-sticker.ts
- Command line
-
hf download hf://SaylorTwift/openclaw/src/cli/program/message/register.emoji-sticker.ts
-
curl -L -o register.emoji-sticker.ts https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/cli/program/message/register.emoji-sticker.ts
2.17 kB
| // Emoji and sticker command registration for Discord-style media assets. | |
| import type { Command } from "commander"; | |
| import { collectOption } from "../helpers.js"; | |
| import type { MessageCliHelpers } from "./helpers.js"; | |
| /** Register emoji list/upload commands. */ | |
| export function registerMessageEmojiCommands(message: Command, helpers: MessageCliHelpers) { | |
| const emoji = message.command("emoji").description("Emoji actions"); | |
| helpers | |
| .withMessageBase(emoji.command("list").description("List emojis")) | |
| .option("--guild-id <id>", "Guild id (Discord)") | |
| .action((opts) => helpers.runMessageAction("emoji-list", opts)); | |
| helpers | |
| .withMessageBase( | |
| emoji | |
| .command("upload") | |
| .description("Upload an emoji") | |
| .requiredOption("--guild-id <id>", "Guild id"), | |
| ) | |
| .requiredOption("--emoji-name <name>", "Emoji name") | |
| .requiredOption("--media <path-or-url>", "Emoji media (path or URL)") | |
| .option("--role-ids <id>", "Role id (repeat)", collectOption, [] as string[]) | |
| .action((opts) => helpers.runMessageAction("emoji-upload", opts)); | |
| } | |
| /** Register sticker send/upload commands. */ | |
| export function registerMessageStickerCommands(message: Command, helpers: MessageCliHelpers) { | |
| const sticker = message.command("sticker").description("Sticker actions"); | |
| helpers | |
| .withMessageBase( | |
| helpers.withRequiredMessageTarget(sticker.command("send").description("Send stickers")), | |
| ) | |
| .requiredOption("--sticker-id <id>", "Sticker id (repeat)", collectOption) | |
| .option("-m, --message <text>", "Optional message body") | |
| .action((opts) => helpers.runMessageAction("sticker", opts)); | |
| helpers | |
| .withMessageBase( | |
| sticker | |
| .command("upload") | |
| .description("Upload a sticker") | |
| .requiredOption("--guild-id <id>", "Guild id"), | |
| ) | |
| .requiredOption("--sticker-name <name>", "Sticker name") | |
| .requiredOption("--sticker-desc <text>", "Sticker description") | |
| .requiredOption("--sticker-tags <tags>", "Sticker tags") | |
| .requiredOption("--media <path-or-url>", "Sticker media (path or URL)") | |
| .action((opts) => helpers.runMessageAction("sticker-upload", opts)); | |
| } | |