Skip to main content

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


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)

Uploaded Source

Built Distribution

blyadogram-0.1.0.dev0-py3-none-any.whl (53.3 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