pd-slack

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

pd-slack

pd-slack

PREREQUISITE: Read
../pd-shared/SKILL.md
for auth and setup.
Run all commands from this skill's directory (the directory containing this SKILL.md):
bash
npx tsx resources/pd-slack.ts <command> [flags]
CommandDescriptionKey Flags
send
Send a message
--channel
✓,
--text
reply
Reply to a thread
--channel
✓,
--thread
✓,
--text
triage
Recent messages summary
--channel
✓,
--limit
threads
Active threads
--channel
✓,
--limit
search
Search messages
--query
✓,
--limit
channels
List channels
--types
(public_channel,private_channel),
--limit
find-channel
Find channel by name
--name
users
List users
--limit
find-user
Find user by name or email
--name
or
--email
react
Add a reaction
--channel
✓,
--timestamp
✓,
--emoji
update
Update a message
--channel
✓,
--ts
✓,
--text
topic
Set channel topic
--channel
✓,
--topic
history
Raw channel history
--channel
✓,
--limit
,
--cursor
前置要求: 阅读
../pd-shared/SKILL.md
了解认证和设置方法。
请从本技能所在目录(包含此SKILL.md的目录)运行所有命令:
bash
npx tsx resources/pd-slack.ts <command> [flags]
命令描述关键参数
send
发送消息
--channel
必填,
--text
必填
reply
回复线程消息
--channel
必填,
--thread
必填,
--text
必填
triage
近期消息摘要
--channel
必填,
--limit
threads
活跃线程消息
--channel
必填,
--limit
search
搜索消息
--query
必填,
--limit
channels
列出频道
--types
(public_channel,private_channel),
--limit
find-channel
根据名称查找频道
--name
必填
users
列出用户
--limit
find-user
根据名称或邮箱查找用户
--name
--email
必填
react
添加表情反应
--channel
必填,
--timestamp
必填,
--emoji
必填
update
更新消息
--channel
必填,
--ts
必填,
--text
必填
topic
设置频道主题
--channel
必填,
--topic
必填
history
原始频道历史消息
--channel
必填,
--limit
,
--cursor

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 eyes
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 eyes

Tips

提示

  • Resolve channel IDs first with
    channels
    or
    find-channel
    . Slack requires
    C
    -prefixed IDs.
  • Find users by name with
    find-user --name
    (fuzzy matches name, real_name, display_name) or by exact email with
    --email
    .
  • triage
    returns truncated text + reaction counts — use
    history
    for full messages.
  • search
    requires a user token (not bot). If it fails, the account may be a bot.
  • mrkdwn:
    *bold*
    ,
    _italic_
    ,
    <@U123>
    mention,
    <#C123>
    channel link.
[!CAUTION]
send
,
reply
,
update
,
react
,
topic
are write commands — confirm before executing.
  • 先解析频道ID:使用
    channels
    find-channel
    命令。Slack要求使用以
    C
    开头的ID。
  • 查找用户:使用
    find-user --name
    (模糊匹配用户名、真实姓名、显示名称)或通过
    --email
    精确匹配邮箱。
  • triage
    命令
    :返回截断的消息文本和表情反应计数——如需完整消息,请使用
    history
    命令。
  • search
    命令
    :需要用户令牌(而非机器人令牌)。如果执行失败,可能当前账号是机器人账号。
  • mrkdwn格式
    *粗体*
    _斜体_
    <@U123>
    提及用户、
    <#C123>
    频道链接。
[!CAUTION]
send
reply
update
react
topic
写入类命令——执行前请确认操作。