Download src/cli/program/message/register.permissions-search.ts from SaylorTwift/openclaw: direct link, hf CLI and curl.
- Browser
- Download file 1.44 kB
-
https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/cli/program/message/register.permissions-search.ts
- Command line
-
hf download hf://SaylorTwift/openclaw/src/cli/program/message/register.permissions-search.ts
-
curl -L -o register.permissions-search.ts https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/cli/program/message/register.permissions-search.ts
1.44 kB
| // Permissions and search command registration for channel message surfaces. | |
| import type { Command } from "commander"; | |
| import { collectOption } from "../helpers.js"; | |
| import type { MessageCliHelpers } from "./helpers.js"; | |
| /** Register the channel permissions inspection command. */ | |
| export function registerMessagePermissionsCommand(message: Command, helpers: MessageCliHelpers) { | |
| helpers | |
| .withMessageBase( | |
| helpers.withRequiredMessageTarget( | |
| message.command("permissions").description("Fetch channel permissions"), | |
| ), | |
| ) | |
| .action((opts) => helpers.runMessageAction("permissions", opts)); | |
| } | |
| /** Register the channel message search command and repeatable filters. */ | |
| export function registerMessageSearchCommand(message: Command, helpers: MessageCliHelpers) { | |
| helpers | |
| .withMessageBase(message.command("search").description("Search messages")) | |
| .requiredOption("--query <text>", "Search query") | |
| .option("--guild-id <id>", "Guild id (Discord)") | |
| .option( | |
| "--channel-id <id>", | |
| "Channel id (Discord) or Graph team-id/channel-id (Microsoft Teams)", | |
| ) | |
| .option("--channel-ids <id>", "Channel id (repeat)", collectOption, [] as string[]) | |
| .option("--author-id <id>", "Author id") | |
| .option("--author-ids <id>", "Author id (repeat)", collectOption, [] as string[]) | |
| .option("--limit <n>", "Result limit") | |
| .action((opts) => helpers.runMessageAction("search", opts)); | |
| } | |