Skip to content

feat: Add Discord and Telegram messaging channel skills#32

Closed
1olaqua616-web wants to merge 1 commit intoqwibitai:mainfrom
1olaqua616-web:feature/add-messaging-channels
Closed

feat: Add Discord and Telegram messaging channel skills#32
1olaqua616-web wants to merge 1 commit intoqwibitai:mainfrom
1olaqua616-web:feature/add-messaging-channels

Conversation

@1olaqua616-web
Copy link
Copy Markdown

Summary

Adds /add-discord and /add-telegram skills to NanoClaw for alternative messaging channel support.

What This Adds

  • /add-discord - Discord channel integration via discord.js
  • /add-telegram - Telegram channel integration via Grammy

Both skills support:

  • Replace WhatsApp mode (DISCORD_ONLY=true / TELEGRAM_ONLY=true)
  • Dual channel mode (run alongside WhatsApp simultaneously)

Key Features

  • Zero base codebase impact - Skills are optional; users run /add-discord or /add-telegram to add integration to their fork
  • Follows NanoClaw philosophy - Skills over features, lean core, users decide what to add
  • Multi-channel routing - Messages route by prefix (dc: for Discord, tg: for Telegram, @g.us for WhatsApp)
  • Built-in commands - /chatid and /ping for easy setup

Implementation Details

Each skill provides step-by-step instructions for:

  1. Creating the bot (Discord Developer Portal / @Botfather)
  2. Installing dependencies (discord.js / grammy)
  3. Creating the channel module (src/discord.ts / src/telegram.ts)
  4. Updating src/config.ts with environment variables
  5. Updating src/db.ts for multi-channel storage
  6. Updating src/index.ts for message routing
  7. Testing the integration

Test Plan

  • Skill files have valid YAML frontmatter
  • Follows established patterns from existing skills
  • No source code modifications in this PR

🤖 Generated with Claude Code

@syabro
Copy link
Copy Markdown

syabro commented Feb 2, 2026

@gavrielc that's what I'm talking about
this skill is all about adding code but the source is md files :(

@1olaqua616-web
Copy link
Copy Markdown
Author

Update: Refactored based on feedback

After reviewing PR #34's comparison and the maintainer's contribution guidelines, I've significantly refactored this PR:

Changes Made

Aspect Before After
Total lines 585 235
Style Pre-written code blocks Instruction-based
Format Copy-paste ready Claude generates code

What I learned

  1. Skills should guide, not provide code - The skill should tell Claude what to create, not give complete implementations
  2. Follow /convert-to-docker pattern - Use 'following the pattern in...' references instead of full code
  3. Include gotchas - Rate limits, privacy mode, chat ID format (positive/negative)
  4. Add removal instructions - How to undo the integration

Testing

Tested end-to-end in a fresh clone:

  • ✅ Claude correctly generated telegram.ts from instructions
  • ✅ Build passes
  • ✅ Telegram bot connects successfully

Thanks to @randomm for the detailed comparison in #34 - it helped me understand the expected approach better.

🤖 Generated with Claude Code

@1olaqua616-web 1olaqua616-web force-pushed the feature/add-messaging-channels branch from b5a8b19 to 9e18b6b Compare February 2, 2026 15:22
Refactored based on PR qwibitai#34 comparison and maintainer's contribution guidelines.

Changes from original submission:
- Removed all pre-written code blocks (was 286 lines → now 130 lines)
- Converted to instruction-based format following /convert-to-docker pattern
- Added 'What changes / What stays same' overview
- Added Known Issues with rate limits, privacy mode, chat ID format
- Added Removal instructions
- Added verification steps

Skill guides Claude to implement the integration step-by-step,
rather than providing copy-paste code.

Tested end-to-end in fresh clone: Telegram bot connects successfully.

🤖 Generated with Claude Code

Amp-Thread-ID: https://ampcode.com/threads/T-019c1e49-76bb-7150-b718-72d776cb6eb9
Co-authored-by: Amp <amp@ampcode.com>
@1olaqua616-web 1olaqua616-web force-pushed the feature/add-messaging-channels branch from 9e18b6b to d28cfc1 Compare February 2, 2026 15:25
jbaruch pushed a commit to jbaruch/nanoclaw-public that referenced this pull request Apr 9, 2026
- SOUL.md injected via systemPrompt.append (survives compaction)
- Untrusted prompts tagged with <untrusted-input> origin markers
- Circuit breaker pauses groups after 5 consecutive failures (30min cooldown)
- settings.json writes skipped when content unchanged (prompt cache optimization)
- New rules: verification protocol, tone matching, query size limits, post-compaction trust

Closes #27, #28, qwibitai#29, qwibitai#31, qwibitai#32, qwibitai#33, qwibitai#34

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
kenansun-dev-bot Bot referenced this pull request in kenansun-dev/nanoclaw-github-copilot Apr 12, 2026
Listen for messageReaction events in both raw and adapter modes.
Reactions stored as '[sender reacted with emoji]' messages so agent
sees them in conversation context and can respond naturally.

Works in both handleIncoming (adapter) and handleIncomingRaw modes.
336/336 tests pass.

Co-authored-by: Kenan Rpi5 Claw <rpi5-claw@nanoclaw.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants