No project description provided
Project description
BLYADOOGRAM - is a library for make Telegram Bots.
Install
$ pip install blyadogram
Example of use:
from blyadogram import Bot, Dispatcher
from blyadogram.types import Message, CallbackQuery, ReplyKeyboardMarkup, KeyboardButton
from blyadogram.filters import Command, Data
from blyadogram.enums 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.callback_query.register(some_func, Data("BUTTON_DATA"))
await bot.skip_updates()
try:
await dp.start_polling(bot)
finally:
await bot.session.close()
if __name__ == '__main__':
asyncio.run(main())
Developer - @ovflw A.K.A. DiorDS
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
blyadogram-0.1.0.dev0.tar.gz
(15.1 kB
view hashes)
Built Distribution
Close
Hashes for blyadogram-0.1.0.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12d1ed9a0cc76117c986ace70e6203e9a31ab32df0a2ad7636be6fc676ffea17 |
|
MD5 | 363ed9d5fd92eeebbb2f19887883aad0 |
|
BLAKE2b-256 | 1649bd39aea5479517c5c3ca99a2fbde84a808e5f1b8094efeb81892d416402c |