😎
Project description
aiogram album
Base handler
from aiogram_album import AlbumMessage
@router.message(F.media_group_id)
async def media_handler(message: AlbumMessage):
await message.reply(
f"album\n"
f"size: {len(message)}\n"
f"content types: {[m.content_type.value for m in message]}"
)
PyrogramAlbumMiddleware
Install
pip install aiogram_album Pyrogram cachetools TgCrypto
Usage
[!CAUTION] Obtain the API key by following Telegram’s instructions and rules at https://core.telegram.org/api/obtaining_api_id
from aiogram_album.pyrogram_album.middleware import PyrogramAlbumMiddleware
await PyrogramAlbumMiddleware.from_app_data(
bot_token=BOT_TOKEN,
api_id=API_ID,
api_hash=API_HASH,
router=dp,
)
TTLCacheAlbumMiddleware
Install
pip install aiogram_album cachetools
Usage
from aiogram_album.ttl_cache_middleware import TTLCacheAlbumMiddleware
TTLCacheAlbumMiddleware(router=dp)
CountCheckAlbumMiddleware
Install
pip install aiogram_album
Usage
from aiogram_album.count_check_middleware import CountCheckAlbumMiddleware
CountCheckAlbumMiddleware(router=dp)
WithoutCountCheckAlbumMiddleware
Install
pip install aiogram_album
Usage
from aiogram_album.no_check_count_middleware import WithoutCountCheckAlbumMiddleware
WithoutCountCheckAlbumMiddleware(router=dp)
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
aiogram_album-0.0.1b0.tar.gz
(17.5 kB
view hashes)
Built Distribution
Close
Hashes for aiogram_album-0.0.1b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6f7ecb43fd31cdf748a2e0d395ad46886e34d29944e6c05f19705886e9a4d4e |
|
MD5 | 032c7e0054eb5291cf3a2b2f888e6ee8 |
|
BLAKE2b-256 | da92ce09490a8558cf7159a38029e343c34eb614fd2d3b7d31431851c57caab8 |