Skip to content

timoniq/telegrinder

Repository files navigation

Telegrinder

telegrinder

— effective and reliable telegram bot building.

Still in development GitHub License Code Style Type Checker Python versions Telegram Bot API Version

Basic example:

from telegrinder import API, Message, Telegrinder, Token
from telegrinder.modules import setup_logger
from telegrinder.rules import Text

setup_logger(level="INFO")
api = API(token=Token("123:token"))
bot = Telegrinder(api)


@bot.on.message(Text("/start"))
async def start(message: Message) -> None:
    me = (await api.get_me()).unwrap()
    await message.answer(f"Hello, {message.from_user.full_name}! I'm {me.full_name}.")


bot.run_forever()

Getting started

Install using pip, uv or poetry:

PyPI Version

uv add telegrinder
poetry add telegrinder
pip install telegrinder

Or install from source (unstable):

GitHub CI

uv add "telegrinder @ git+https://github.com/timoniq/telegrinder@dev"
poetry add git+https://github.com/timoniq/telegrinder@dev
pip install git+https://github.com/timoniq/telegrinder@dev

Documentation

Tutorial 📖

Community

Join one of our forums.

License

Telegrinder is MIT licensed
Copyright © 2022 timoniq
Copyright © 2024 luwqz1

Contributors

We welcome your pull requests (contrubution notes). Telegrinder is built by the community