跳到正文
所有工具

telegram_delete_message

Telegram · macOS · Windows

效果: 删除. 状态: 受限可用.

“受限可用”表示工具可能取决于版本、平台、权限、账户或配置,并不表示它在所有安装中都已启用。

macOS

用途

为所有人删除你在 Telegram 私聊或基础群组中发送的一条消息,仅在接收者确认之后:接收者必须用文本 ACK 回复了那条确切的消息(Telegram 应用中的真人,或使用 telegram_send_message reply_to_message_id 的代理)。破坏性操作,带预览:confirm=false(默认)只检查 ACK,不删除任何内容;请向用户展示预览,并仅在他们批准后才使用 confirm=true 和相同的 account 再次调用。confirm 会重新检查一切。读取聊天、unread=0 或任何文本都不算 ACK。ACK 只能证明另一个 Telegram 账户作出了回复,不能证明那是另一个人;在此 LMCP 中关联的账户绝不会被接受为接收者,因此每台运行代理的电脑都需要自己的 Telegram 账户。在基础群组中,ACK 证明的是你指名为接收者的用户作出了回复,而不是该消息本就是发给他们的:接收者就是你指名的人。不支持超级群组和频道。state deleted 表示该消息在此账户中已不存在(已请求为所有人删除);unknown 表示它可能已被删除,因此请再次调用,答复将为 deleted 或 not_found。

必填输入

输入名称会严格保持工具要求的形式。下方可展开的架构中保留英文规范技术定义。

权限与确认

架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。

英文规范技术架构 — macOS
{
  "properties": {
    "account": {
      "description": "Which linked Telegram account to use: its label or id from telegram_list_accounts. Leave it out to use the default account.",
      "type": "string"
    },
    "ack_message_id": {
      "description": "Id of the receiver's reply ACK to that message (from telegram_read_messages).",
      "type": "integer"
    },
    "chat_id": {
      "description": "Chat id from telegram_list_chats: user:… (private) or chat:… (basic group).",
      "type": "string"
    },
    "confirm": {
      "description": "Must be true to delete. Without it, returns a preview and deletes nothing.",
      "type": "boolean"
    },
    "message_id": {
      "description": "Id of your own message to delete (from telegram_read_messages).",
      "type": "integer"
    },
    "receiver": {
      "description": "The receiver's user:<id>:<hash> id from telegram_list_chats. Only this user's ACK counts.",
      "type": "string"
    }
  },
  "required": [
    "chat_id",
    "message_id",
    "ack_message_id",
    "receiver"
  ],
  "type": "object"
}

文档示例

telegram_delete_message 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。

{
  "ack_message_id": 4022,
  "chat_id": "user:5550100123",
  "confirm": false,
  "message_id": 4021,
  "receiver": "user:5550100123:9f8e7d6c5b4a"
}

Windows

用途

为所有人删除你在 Telegram 私聊或基础群组中发送的一条消息,仅在接收者确认之后:接收者必须用文本 ACK 回复了那条确切的消息(Telegram 应用中的真人,或使用 telegram_send_message reply_to_message_id 的代理)。破坏性操作,带预览:confirm=false(默认)只检查 ACK,不删除任何内容;请向用户展示预览,并仅在他们批准后才使用 confirm=true 和相同的 account 再次调用。confirm 会重新检查一切。读取聊天、unread=0 或任何文本都不算 ACK。ACK 只能证明另一个 Telegram 账户作出了回复,不能证明那是另一个人;在此 LMCP 中关联的账户绝不会被接受为接收者,因此每台运行代理的电脑都需要自己的 Telegram 账户。在基础群组中,ACK 证明的是你指名为接收者的用户作出了回复,而不是该消息本就是发给他们的:接收者就是你指名的人。不支持超级群组和频道。state deleted 表示该消息在此账户中已不存在(已请求为所有人删除);unknown 表示它可能已被删除,因此请再次调用,答复将为 deleted 或 not_found。

必填输入

输入名称会严格保持工具要求的形式。下方可展开的架构中保留英文规范技术定义。

权限与确认

架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。

英文规范技术架构 — Windows
{
  "properties": {
    "account": {
      "description": "Which linked Telegram account to use: its label or id from telegram_list_accounts. Leave it out to use the default account.",
      "type": "string"
    },
    "ack_message_id": {
      "description": "Id of the receiver's reply ACK to that message (from telegram_read_messages).",
      "type": "integer"
    },
    "chat_id": {
      "description": "Chat id from telegram_list_chats: user:… (private) or chat:… (basic group).",
      "type": "string"
    },
    "confirm": {
      "description": "Must be true to delete. Without it, returns a preview and deletes nothing.",
      "type": "boolean"
    },
    "message_id": {
      "description": "Id of your own message to delete (from telegram_read_messages).",
      "type": "integer"
    },
    "receiver": {
      "description": "The receiver's user:<id>:<hash> id from telegram_list_chats. Only this user's ACK counts.",
      "type": "string"
    }
  },
  "required": [
    "chat_id",
    "message_id",
    "ack_message_id",
    "receiver"
  ],
  "type": "object"
}

文档示例

telegram_delete_message 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。

{
  "ack_message_id": 4022,
  "chat_id": "user:5550100123",
  "confirm": false,
  "message_id": 4021,
  "receiver": "user:5550100123:9f8e7d6c5b4a"
}