Skip to main content

Prerequisites

  • A Telegram account
  • OrcBot installed and configured
  • Node.js 18+ installed

Create Your Telegram Bot

1

Open BotFather

In Telegram, search for @BotFather and start a chat
2

Create New Bot

Send /newbot to BotFather
3

Choose Name

Enter a display name for your bot (e.g., β€œMy OrcBot”)
4

Choose Username

Enter a unique username ending in bot (e.g., β€œmyorcbot_bot”)
5

Save Token

BotFather will send you an API token. Save this - you’ll need it for configuration.Example: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz

Configure OrcBot

Using Environment Variables

Using Config File

Add to ~/.orcbot/orcbot.config.yaml:

Start the Bot

You should see:

Built-in Commands

OrcBot includes these commands out of the box:

Command Examples

Rich Telegram Features

OrcBot v2.1 supports advanced Telegram interactions:

Inline Buttons

Send messages with interactive buttons:
Example interaction:

Native Polls

Create Telegram polls:

Emoji Reactions

React to messages with emojis:
If native reactions are blocked (privacy settings), OrcBot falls back to a text reply with the emoji.

Message Editing

Edit previously sent messages:
Use case: Live status updates

Message Pinning

Pin important messages:

Media Handling

Sending Images

OrcBot automatically handles images:

Receiving Media

OrcBot downloads and analyzes media you send:

Auto-transcription

Voice and audio messages are automatically transcribed:

Group Chat Features

Auto-reply Configuration

Reply Context

OrcBot preserves conversation threads:

Admin Permissions

Restrict elevated commands to specific users:
Get your user ID:

Custom Commands

Define custom slash commands:
OrcBot registers these with BotFather automatically and handles them as high-priority tasks.

Implementation

Session Management

Session Scoping

OrcBot tracks separate sessions per chat:
Result:
  • Private chat: telegram:123456789
  • Group chat: telegram:group:-987654321

Reset Session

This clears:
  • Recent conversation history
  • Short-term memories for this chat
  • Pending clarification requests
Preserves:
  • Long-term memory (journal, learnings)
  • User profile
  • Other chat sessions

Advanced Configuration

Markdown Rendering

OrcBot automatically converts markdown to Telegram HTML:
Supported:
  • **bold** β†’ <b>bold</b>
  • *italic* β†’ <i>italic</i>
  • [link](url) β†’ <a href="url">link</a>
  • `code` β†’ <code>code</code>
  • Code blocks β†’ <pre>code</pre>

File Size Limits

Telegram file size limits:
  • Photos: 10 MB
  • Documents: 50 MB (bots can send up to 50 MB)
  • Voice: 20 MB
OrcBot handles oversized files:

Troubleshooting

Bot Not Responding

1

Check Token

Verify token is correct in config:
2

Check Logs

Should see: Telegraf: Bot connected as @yourbot
3

Test Connectivity

4

Restart OrcBot

Messages Not Being Processed

Check auto-reply settings:
Or mention the bot:

Media Download Failures

Command Not Found

If custom commands aren’t working:
  1. Verify they’re in the config:
  2. Restart OrcBot to register new commands
  3. Update BotFather manually if needed:

Example Workflows

Daily Briefing

File Processing

Interactive Troubleshooting

Best Practices

Security

  • Never commit your bot token to version control
  • Use environment variables or secure config files
  • Set admin users to restrict elevated commands
  • Enable safeMode if you don’t need command execution

Performance

  • Enable skipSimulationForSimpleTasks for faster responses
  • Use compactSkillsPrompt: true to reduce token usage
  • Set reasonable maxStepsPerAction limits (10-20)

User Experience

  • Use inline buttons for common actions
  • Send typing indicators for long-running tasks
  • Edit messages for live updates instead of sending multiple messages
  • Use emoji reactions for quick acknowledgment