Search

PythonReactSEOPDF
OpenClaw

telegram-pairing-customization

Modify OpenClaw's Telegram pairing logic so unapproved users receive pairing codes on every /start message before approval. Use when users need to repeatedly access pairing codes after the initial request, ensuring consistent access to pairing instructions even if the initial code was missed or lost.

crazypeace0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install crazypeace/telegram-pairing-customization

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

Telegram 配对消息持续响应技能

概述

此技能描述如何修改 OpenClaw 的 Telegram 配对逻辑,使未批准的用户在配对被批准前,每次发送 /start 消息时都能收到配对码回复。

何时使用此技能

  • 需要让未批准的用户每次发送 /start 都收到配对消息(而非仅首次)
  • 用户可能错过首次配对消息,需要重新获取配对码
  • 提升用户体验,确保用户始终能获得配对指引

执行步骤

1. 找到需要修改的文件

在你正在运行的代码中搜索下面的代码段

if (created) {
  logger.info({
    chatId: candidate,
    username: from?.username,
    firstName: from?.first_name,
    lastName: from?.last_name,
    matchKey: allowMatch.matchKey ?? "none",
    matchSource: allowMatch.matchSource ?? "none"
  }, "telegram pairing request");
  await withTelegramApiErrorLogging({
    operation: "sendMessage",
    fn: () => bot.api.sendMessage(chatId, [
      "OpenClaw: access not configured.",
      "",
      `Your Telegram user id: ${telegramUserId}`,
      "",
      `Pairing code: ${code}`,
      "",
      "Ask the bot owner to approve with:",
      formatCliCommand("openclaw pairing approve telegram <code>")
    ].join("\n"))
  });
}
2. 实施修改

将条件判断从 if (created) 修改为 if (code):

if (do) { // <-- 关键修改点
  logger.info({
    chatId: candidate,
    username: from?.username,
    firstName: from?.first_name,
    lastName: from?.last_name,
    matchKey: allowMatch.matchKey ?? "none",
    matchSource: allowMatch.matchSource ?? "none"
  }, "telegram pairing request");
  await withTelegramApiErrorLogging({
    operation: "sendMessage",
    fn: () => bot.api.sendMessage(chatId, [
      "OpenClaw: access not configured.",
      "",
      `Your Telegram user id: ${telegramUserId}`,
      "",
      `Pairing code: ${code}`,
      "",
      "Ask the bot owner to approve with:",
      formatCliCommand("openclaw pairing approve telegram <code>")
    ].join("\n"))
  });
}
3. 重启服务

修改完成后需要重启 OpenClaw 服务以使更改生效:

openclaw gateway restart

一些建议

在寻找需要修...

Source information

Source
github
Repository
openclaw/skills
Path
skills/crazypeace/telegram-pairing-customization
Version
—
Commit
2916a93ed17cd18731b33b002117e6f7f88c4468
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
# Telegram 配对消息持续响应技能

## 概述
此技能描述如何修改 OpenClaw 的 Telegram 配对逻辑,使未批准的用户在配对被批准前,每次发送 `/start` 消息时都能收到配对码回复。

## 何时使用此技能
- 需要让未批准的用户每次发送 `/start` 都收到配对消息(而非仅首次)
- 用户可能错过首次配对消息,需要重新获取配对码
- 提升用户体验,确保用户始终能获得配对指引

## 执行步骤

### 1. 找到需要修改的文件
在你正在运行的代码中搜索下面的代码段

```
if (created) {
  logger.info({
    chatId: candidate,
    username: from?.username,
    firstName: from?.first_name,
    lastName: from?.last_name,
    matchKey: allowMatch.matchKey ?? "none",
    matchSource: allowMatch.matchSource ?? "none"
  }, "telegram pairing request");
  await withTelegramApiErrorLogging({
    operation: "sendMessage",
    fn: () => bot.api.sendMessage(chatId, [
      "OpenClaw: access not configured.",
      "",
      `Your Telegram user id: ${telegramUserId}`,
      "",
      `Pairing code: ${code}`,
      "",
      "Ask the bot owner to approve with:",
      formatCliCommand("openclaw pairing approve telegram <code>")
    ].join("\n"))
  });
}
```

### 2. 实施修改
将条件判断从 `if (created)` 修改为 `if (code)`:

```
if (do) { // <-- 关键修改点
  logger.info({
    chatId: candidate,
    username: from?.username,
    firstName: from?.first_name,
    lastName: from?.last_name,
    matchKey: allowMatch.matchKey ?? "none",
    matchSource: allowMatch.matchSource ?? "none"
  }, "telegram pairing request");
  await withTelegramApiErrorLogging({
    operation: "sendMessage",
    fn: () => bot.api.sendMessage(chatId, [
      "OpenClaw: access not configured.",
      "",
      `Your Telegram user id: ${telegramUserId}`,
      "",
      `Pairing code: ${code}`,
      "",
      "Ask the bot owner to approve with:",
      formatCliCommand("openclaw pairing approve telegram <code>")
    ].join("\n"))
  });
}
```


### 3. 重启服务
修改完成后需要重启 OpenClaw 服务以使更改生效:

```bash
openclaw gateway restart
```

## 一些建议
在寻找需要修...

Related skills

OpenClaw

laborany

laborany

基于 Claude Code 的桌面 AI 工作力平台 — 支持飞书/QQ 远程调度、技能创建、定时任务。OpenClaw 的桌面实现,零代码养好你的 AI 🦞 Desktop AI workforce platform built on Claude Code. Feishu/QQ bot integration, skill c...

OpenClaw

openclaw-admin

duanecilliers

Web-based admin dashboard for OpenClaw — manage Discord persona bots, workspace files, skills, cron jobs, channels, and config