An intuitive framework for creating Telegram bots
Project description
An intuitive framework for creating Telegram bots.
Create your own bot in less than 100 lines!
•
•
Pyrubrum
from pyrogram import Client
from pyrubrum import Handler, Menu, transform
bot = Client(...)
handler = Handler(transform(
{
Menu("Start", "start", "Hello!", default=True): [
Menu("About me", "about_me", "I'm just a bot!"),
Menu("Thoughts", "thoughts",
"I'm a bot, I cannot think properly..."),
]
}
))
handler.setup(bot)
bot.run()
Pyrubrum (/ˈpaɪɹˈuːbɹəm/) is a versatile, charming framework for creating Telegram bots, jointly with Pyrogram.
Examples
In order to make use of the proposed examples, you need to create your own environment file by renaming sample.env into .env
and editing all the necessary variables.
- Café - Get an overview of the design which lies inside Pyrubrum while interacting with multiple commands and pages.
- Calendar - Get what day of the week a day is by simply choosing a year, a month and a day while discovering the potential of Pyrubrum page menus.
- Hitchhiker - Come to know how media are handled with Pyrubrum and...get an existential question answered.
- Sample - Interact with inline menus while understanding how Pyrubrum works.
Changelog
See CHANGELOG.md. Find new features in FEATURES.md.
Commit messages
See Conventional Commits.
Versioning
See PEP 440.
Thanks
- veggero/tytg for giving me the idea of developing a simple framework with which you can code a folder-like bot.
- IlhomBahoraliev/pyromenu for letting me understand that an object-oriented library would make the difference in developing this project.
Branding
Copyright & License
- Copyright (C) 2020 Hearot.
- Licensed under the terms of the GNU General Public License v3 (GPLv3).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Pyrubrum-0.1a1.dev7.tar.gz
(49.8 kB
view hashes)
Built Distribution
Close
Hashes for Pyrubrum-0.1a1.dev7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1bae86751ffcc06530bc84168329888e873883d49b110d024854285989eaccb |
|
MD5 | e210fdbcf76739f5f49aa8ce225ab053 |
|
BLAKE2b-256 | 379a2f861d9a271f3ff3d2061e223371fd42e9a10f111cf69ac376c4c34394de |