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.
Why use this skill?
Learn how to modify OpenClaw to display persistent Telegram pairing codes, improving onboarding flow and user experience for pending users.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/crazypeace/telegram-pairing-customizationWhat This Skill Does
This skill provides a surgical modification to the core OpenClaw Telegram authentication workflow. By default, OpenClaw only displays the pairing code and authentication instructions to a user upon their very first interaction with the bot (the initial /start command). If the user clears their chat history, ignores the message, or simply loses track of the pairing code, they become effectively "locked out" of the onboarding process, requiring an administrator to manually intervene or debug the session state.
By implementing this customization, you change the logic from checking if a pairing request was "just created" to checking if a "valid pairing code exists" for the user. This ensures that every time a pending user sends the /start command, the bot will re-dispatch the pairing code and the specific CLI command needed to approve them. It essentially turns the static initial response into a persistent, helpful onboarding loop.
Installation
- Locate your OpenClaw installation directory, typically found at
/usr/lib/node_modules/openclaw/. - Use
grep -r "Ask the bot owner to approve with:" .to find the exact file containing the pairing logic. - Back up the target file before proceeding with any modifications.
- Open the file in your preferred text editor (e.g., nano or vim).
- Locate the code block checking
if (created). - Replace the
createdcondition withcode. Ensure the syntax matches the provided snippet in the implementation guide. - Save the file and execute
openclaw gateway restartto apply the changes to the running environment.
Use Cases
- High-Friction Onboarding: In environments where users are technically inexperienced and often misplace instructions, this keeps the onboarding path clear and accessible.
- Support Reduction: Reduces the number of "I lost my code" support tickets administrators receive, as the bot becomes self-service regarding pairing status.
- Testing Environments: During development or testing phases where pairing and unpairing occur frequently, this provides immediate feedback without needing to reset the database state.
Example Prompts
- "OpenClaw, I cannot find my Telegram pairing code. Can you show it to me again?"
- "I am trying to join the bot, but I closed the first message. What is the command to get my pairing code back?"
- "I'm stuck at the authentication step; can you re-send the pairing instructions?"
Tips & Limitations
- Persistence: This change is applied to the application code. If you perform an
npm updateoropenclaw update, your changes may be overwritten. Keep a copy of your patch or use a patching tool to re-apply it after updates. - Permissions: Ensure you are editing files with appropriate user permissions (e.g., sudo), as node_modules directories are often owned by root or a specific system service user.
- Verification: Always test the change by using a secondary Telegram account that has not been approved yet to verify that the /start command now triggers the expected response loop.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-crazypeace-telegram-pairing-customization": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write
Related Skills
Telethon Session
Skill by crazypeace
Openclaw Self Clone Everything
Skill by crazypeace
telegram-pairing-message-customization
Add custom messages to Telegram pairing replies for unapproved users. Insert custom text (e.g., group links, instructions) above the approval command in pairing messages. Use when unpaired Telegram users need additional guidance during the pairing process.
telegram-pairing-approver
创建一个持久运行的Telegram机器人服务,用于自动处理配对代码并批准Telegram会话权限。使用时提供机器人令牌,自动创建机器人脚本和服务文件,并启动系统服务。适用于需要自动处理Telegram配对请求的场景。
telegram-pairing-send-code-to-every-start
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.