Spaces:
Paused
Paused
File size: 1,265 Bytes
fb4d8fe | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | import type { Command } from "commander";
import type { MessageCliHelpers } from "./helpers.js";
export function registerMessageReactionsCommands(message: Command, helpers: MessageCliHelpers) {
helpers
.withMessageBase(
helpers.withRequiredMessageTarget(
message.command("react").description("Add or remove a reaction"),
),
)
.requiredOption("--message-id <id>", "Message id")
.option("--emoji <emoji>", "Emoji for reactions")
.option("--remove", "Remove reaction", false)
.option("--participant <id>", "WhatsApp reaction participant")
.option("--from-me", "WhatsApp reaction fromMe", false)
.option("--target-author <id>", "Signal reaction target author (uuid or phone)")
.option("--target-author-uuid <uuid>", "Signal reaction target author uuid")
.action(async (opts) => {
await helpers.runMessageAction("react", opts);
});
helpers
.withMessageBase(
helpers.withRequiredMessageTarget(
message.command("reactions").description("List reactions on a message"),
),
)
.requiredOption("--message-id <id>", "Message id")
.option("--limit <n>", "Result limit")
.action(async (opts) => {
await helpers.runMessageAction("reactions", opts);
});
}
|