BLAZOGRAM - is a library for make Telegram Bots
Project description
BLAZOGRAM - is a library for make Telegram Bots.
Install
$ pip install blazogram
Example of use:
from blazogram import Bot, Dispatcher
from blazogram.types import Message, CallbackQuery, ReplyKeyboardMarkup, KeyboardButton
from blazogram.filters import Command, Data
from blazogram.utils import ParseMode
import asyncio
async def start_command(message: Message):
kb = ReplyKeyboardMarkup()
button = KeyboardButton(text='BUTTON')
kb.add_button(button)
await message.answer(text='Hello World!', reply_markup=kb)
async def some_func(callback: CallbackQuery):
await callback.answer(text='Hello World!', show_alert=True)
async def main():
bot = Bot(token='YOUR-BOT-TOKEN', parse_mode=ParseMode.HTML)
dp = Dispatcher()
dp.message.register(start_command, Command("start"))
dp.message.register(some_func, Data("BUTTON_DATA"))
await bot.skip_updates()
await dp.start_polling(bot)
if __name__ == '__main__':
asyncio.run(main())
Developer - @Blaze Egor
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
blazogram-1.0.1.tar.gz
(10.3 kB
view hashes)
Built Distribution
blazogram-1.0.1-py3-none-any.whl
(17.2 kB
view hashes)
Close
Hashes for blazogram-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a664a5ed474900a3729539cd3d57051c5dd205fb6e6ddc98dba071ee0ebe42de |
|
MD5 | 7a9d17df87ad573352024cba0dc3fbcb |
|
BLAKE2b-256 | eea476452685784d92bb2a28df8157babcf9b26d5a67f4e758ebb87fef19e89c |