Skip to content

9v2/tgram

This branch is 91 commits behind z44d/tgram:main.

Repository files navigation

tgram

tgram

A user-friendly Telegram Bot API library for Python developers.
Channel β€’ Documentation β€’ Examples

πŸš€ Quick Start

Here's a basic example to get started with tgram:

from tgram import TgBot, filters
from tgram.types import Message

bot = TgBot("YOUR_BOT_TOKEN")

@bot.on_message(filters.text & filters.private)
async def on_message(bot: TgBot, message: Message) -> Message:
    # Echo the incoming message
    return await message.reply_text(
        message.text,
        entities=message.entities
    )

bot.run()

πŸ“¦ Features

  • Smart Plugins: Auto-loadable plugins for modular development.
  • Filters for Handlers: Simplify event handling with filters.
  • Bound Methods: Access bound methods for different update types easily.

πŸ“š Documentation

Full documentation is available here.

πŸ”§ Installation

You can install the tgram library using one of the following methods:

Via git:

pip install git+https://github.com/z44d/tgram -U

Via PyPI (Recommended)

pip install tgram -U

πŸ’‘ Requirements

  • Python: Version 3.8 or higher.
  • Telegram Bot Token: Obtain one by following this guide.

πŸ’¬ Help & Support

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%