Skip to main content

Telegram Plugin Examples

This document provides practical examples of using the @elizaos/plugin-telegram package in various scenarios.

Basic Bot Setup

Simple Message Bot

Create a basic Telegram bot that responds to messages:

Echo Bot

A simple bot that echoes messages back:

FAQ Bot

Bot that answers frequently asked questions:

Interactive Button Bots

Button Menu Bot

Create a bot with interactive button menus:

Inline Keyboard Bot

Bot with inline URL buttons:

Callback Handler

Handle button callbacks:

Media Processing Bots

Image Analysis Bot

Bot that analyzes images using vision capabilities:

Voice Transcription Bot

Bot that transcribes voice messages:

Document Processor

Bot that processes various document types:

Group Management Bots

Group Moderator Bot

Bot that helps moderate groups:

Restricted Access Bot

Bot with access control:

Forum Topic Bot

Bot that handles forum topics:

Advanced Examples

Multi-Language Bot

Bot that supports multiple languages:

Webhook Bot

Bot configured for webhooks:

State Management Bot

Bot with persistent state management:

Error Handling Bot

Bot with comprehensive error handling:

Testing Examples

Test Bot Configuration

Best Practices Examples

Production-Ready Bot