Skip to main content

Telegram Bot framework

Project description

yatbaf

Asynchronous Telegram Bot API framework.

Requirements

Python 3.11+

Installation

$ pip install yatbaf

Simple echo bot

import yatbaf.filters as f
from yatbaf import Bot, on_message
from yatbaf.types import Message


@on_message(filters=[f.text])
async def echo(message: Message) -> None:
    await message.answer(message.text)


Bot("<REPLACE-WITH-YOUR-TOKEN>", [echo]).run()

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yatbaf-0.10.0.tar.gz (195.1 kB view hashes)

Uploaded Source

Built Distribution

yatbaf-0.10.0-py3-none-any.whl (225.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page