pd-slack
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesepd-slack
pd-slack
PREREQUISITE: Readfor auth and setup.../pd-shared/SKILL.md
Run all commands from this skill's directory (the directory containing this SKILL.md):
bash
npx tsx resources/pd-slack.ts <command> [flags]| Command | Description | Key Flags |
|---|---|---|
| Send a message | |
| Reply to a thread | |
| Recent messages summary | |
| Active threads | |
| Search messages | |
| List channels | |
| Find channel by name | |
| List users | |
| Find user by name or email | |
| Add a reaction | |
| Update a message | |
| Set channel topic | |
| Raw channel history | |
前置要求: 阅读了解认证和设置方法。../pd-shared/SKILL.md
请从本技能所在目录(包含此SKILL.md的目录)运行所有命令:
bash
npx tsx resources/pd-slack.ts <command> [flags]| 命令 | 描述 | 关键参数 |
|---|---|---|
| 发送消息 | |
| 回复线程消息 | |
| 近期消息摘要 | |
| 活跃线程消息 | |
| 搜索消息 | |
| 列出频道 | |
| 根据名称查找频道 | |
| 列出用户 | |
| 根据名称或邮箱查找用户 | |
| 添加表情反应 | |
| 更新消息 | |
| 设置频道主题 | |
| 原始频道历史消息 | |
Examples
示例
bash
npx tsx resources/pd-slack.ts find-channel --name general
npx tsx resources/pd-slack.ts find-user --name Giao
npx tsx resources/pd-slack.ts find-user --email alice@company.com
npx tsx resources/pd-slack.ts send --channel C0123456789 --text 'Hello team!'
npx tsx resources/pd-slack.ts triage --channel C0123456789 --limit 10
npx tsx resources/pd-slack.ts search --query 'deployment failed'
npx tsx resources/pd-slack.ts reply --channel C0123456789 --thread 1234567890.123456 --text 'On it!'
npx tsx resources/pd-slack.ts react --channel C0123456789 --timestamp 1234567890.123456 --emoji eyesbash
npx tsx resources/pd-slack.ts find-channel --name general
npx tsx resources/pd-slack.ts find-user --name Giao
npx tsx resources/pd-slack.ts find-user --email alice@company.com
npx tsx resources/pd-slack.ts send --channel C0123456789 --text 'Hello team!'
npx tsx resources/pd-slack.ts triage --channel C0123456789 --limit 10
npx tsx resources/pd-slack.ts search --query 'deployment failed'
npx tsx resources/pd-slack.ts reply --channel C0123456789 --thread 1234567890.123456 --text 'On it!'
npx tsx resources/pd-slack.ts react --channel C0123456789 --timestamp 1234567890.123456 --emoji eyesTips
提示
- Resolve channel IDs first with or
channels. Slack requiresfind-channel-prefixed IDs.C - Find users by name with (fuzzy matches name, real_name, display_name) or by exact email with
find-user --name.--email - returns truncated text + reaction counts — use
triagefor full messages.history - requires a user token (not bot). If it fails, the account may be a bot.
search - mrkdwn: ,
*bold*,_italic_mention,<@U123>channel link.<#C123>
[!CAUTION],send,reply,update,reactare write commands — confirm before executing.topic
- 先解析频道ID:使用或
channels命令。Slack要求使用以find-channel开头的ID。C - 查找用户:使用(模糊匹配用户名、真实姓名、显示名称)或通过
find-user --name精确匹配邮箱。--email - 命令:返回截断的消息文本和表情反应计数——如需完整消息,请使用
triage命令。history - 命令:需要用户令牌(而非机器人令牌)。如果执行失败,可能当前账号是机器人账号。
search - mrkdwn格式:、
*粗体*、_斜体_提及用户、<@U123>频道链接。<#C123>
[!CAUTION]、send、reply、update、react为写入类命令——执行前请确认操作。topic