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, transform_dict, Menu
bot = Client(...)
handler = Handler(transform_dict(
{
Menu("Main", "main", "Hello!"): {
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 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.
- 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.
- Sample - Interact with inline menus while understanding how Pyrubrum works.
Commit messages
This project makes use of the Conventional Commits specification.
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.dev0.tar.gz
(9.4 kB
view hashes)
Built Distributions
Pyrubrum-0.1a1.dev0-py3.8.egg
(50.5 kB
view hashes)
Close
Hashes for Pyrubrum-0.1a1.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2802cedb2fa1d212ed5f05ae15427fcdc9f0b27b3d0c972b77853128b0aabe6 |
|
MD5 | a56ab064b767bc4eb02e049049cc096e |
|
BLAKE2b-256 | 02476fd6ad0966bfc0c74213ebeeba81cc8734a5a47c6e9d703ce0459769754c |