API Reference

This section provides detailed documentation for all the classes and methods in Gpgram.

Core Components

The core components of Gpgram are:

  • Bot - The main interface to the Telegram Bot API

  • Dispatcher - Manages the routing of updates to the appropriate handlers

  • Router - Organizes handlers for different types of updates

Types

Gpgram provides Pydantic models for Telegram API types:

  • Update - Represents an incoming update from Telegram

  • Message - Represents a message in Telegram

  • User - Represents a Telegram user or bot

  • Chat - Represents a chat in Telegram

  • CallbackQuery - Represents a callback query from an inline keyboard

Filters

Filters are used to determine whether a handler should process an update:

Utilities

Gpgram provides utilities for common tasks:

Simplified Interfaces

Gpgram provides simplified interfaces for common tasks:

  • SimpleBot - A simplified interface for the Bot class

  • SimpleMessage - A simplified interface for the Message class

  • Handler - A simplified interface for handling updates

  • Button - Base class for all button types

  • InlineButton - Represents an inline keyboard button

  • KeyboardButton - Represents a keyboard button

Advanced Features

Gpgram provides advanced features for more complex bots:

Payments

Gpgram provides support for Telegram Payments: