Town CLIPlugin

town chat

托管 chat plugin 命令,用于 chat platform runtime、消息发送、会话查看与访问控制

town chat

town chat 是托管 chat plugin 的命令组。

适合这些场景:

  • 管理 chat platform runtime
  • 查看会话、上下文与历史
  • 发送消息与消息反应
  • 管理平台用户访问控制

用法

town chat
town chat <subcommand> [options]

主要子命令

  • status
  • test
  • reconnect
  • open
  • close
  • configuration
  • configure
  • list
  • info
  • send
  • react
  • context
  • delete
  • history
  • auth set <platform:userId>

调度

send 支持一次性延迟/定时执行:

  • --delay <ms>
  • --time <time>

适合“把一条现成消息稍后发出去一次”。如果要长期自动化或 cron,优先用 town task

示例

town chat list --limit 20
town chat info --chat-key ctx_xxxxxxxxxxxxxxxx
town chat send --chat-key ctx_xxxxxxxxxxxxxxxx --text "done"
town chat react --chat-key ctx_xxxxxxxxxxxxxxxx --emoji "✅"
town chat history --chat-key ctx_xxxxxxxxxxxxxxxx --limit 50
town chat auth set telegram:12345678 --role admin

相关页面