Skip to content

Latest commit

 

History

History
executable file
·
79 lines (52 loc) · 1.7 KB

readme.md

File metadata and controls

executable file
·
79 lines (52 loc) · 1.7 KB

Telegrinder

Framework for effective and reliable telegram bot building.

Still in development.

  • Type hinted
  • Customizable and extensible
  • Ready to use scenarios and rules
  • Fast models built on msgspec
  • Both low-level and high-level API
  • Support optional dependecies

Getting started

Install using pip:

pip install telegrinder

Using poetry:

poetry add telegrinder

Install from github:

pip install -U https://github.com/timoniq/telegrinder/archive/dev.zip
poetry add git+https://github.com/timoniq/telegrinder.git#dev

Basic example:

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

api = API(token=Token("123:token"))
bot = Telegrinder(api)
logger.set_level("INFO")


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


bot.run_forever()

Documentation

Readthedocs

Community

Join our telegram forum.

License

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

Contributors