import type { Command } from "commander"; import type { MessageCliHelpers } from "./helpers.js"; export function registerMessageReactionsCommands( message: Command, helpers: MessageCliHelpers, ) { helpers .withMessageBase( helpers.withMessageTarget( message.command("react").description("Add or remove a reaction"), ), ) .requiredOption("--message-id ", "Message id") .option("--emoji ", "Emoji for reactions") .option("--remove", "Remove reaction", false) .option("--participant ", "WhatsApp reaction participant") .option("--from-me", "WhatsApp reaction fromMe", false) .option("--channel-id ", "Channel id (defaults to --to)") .action(async (opts) => { await helpers.runMessageAction("react", opts); }); helpers .withMessageBase( helpers.withMessageTarget( message.command("reactions").description("List reactions on a message"), ), ) .requiredOption("--message-id ", "Message id") .option("--limit ", "Result limit") .option("--channel-id ", "Channel id (defaults to --to)") .action(async (opts) => { await helpers.runMessageAction("reactions", opts); }); }