| name | rag-learning |
| description | Add Telegram as a communication channel for NanoBob. Use when this capability is needed. |
| metadata | {"author":"BeamusWayne"} |
/add-telegram - Telegram Channel Skill
Purpose
Add Telegram as a communication channel for NanoBob.
Prerequisites
What This Skill Does
- Creates
src/channels/telegram.ts with Telegram channel implementation
- Adds import to
src/channels/index.ts
- Updates
.env with TELEGRAM_BOT_TOKEN
- Rebuilds the project
Usage
Inside the claude CLI, run:
/add-telegram
Then follow prompts to:
- Enter your Telegram Bot Token
- Test the connection
- Register groups from Telegram chats
Implementation Details
Channel File: src/channels/telegram.ts
import { registerChannel, ChannelOpts } from './registry.js';
import { Telegraf } from 'telegraf';
export class TelegramChannel implements Channel {
}
registerChannel('telegram', (opts: ChannelOpts) => {
const token = process.env.TELEGRAM_BOT_TOKEN;
if (!token) return null;
return new TelegramChannel(opts);
});
Dependencies
Add to package.json:
"telegraf": "^4.16.0"
Environment Variable
TELEGRAM_BOT_TOKEN=your_bot_token_here
Post-Installation
- Run
npm install to install new dependencies
- Run
npm run build to compile TypeScript
- Restart NanoBob
- Use
@Bob in your Telegram chats
Source: BeamusWayne/RAG-learning — distributed by TomeVault.