/tgram

Primary LanguagePythonMIT LicenseMIT

tgram
A very friendly BOT API library for python developers.
Channel Documentation Examples

tgram PyPI Downloads

Example Usage

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

bot = TgBot("TOKEN")

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

bot.run_for_updates()

Features

  • Smart plugins with auto-load.
  • Filters for handlers.
  • Bound methods for update types.

Requirements

How to install?

Here's how to install the tgram library. The commands are given below:

# With Git
pip install git+https://github.com/2ei/tgram -U

# With PyPi (Recommended)
pip install tgram -U

Help & Support