[Python] Send paid media aiogram 3.10

Discussão em 'Python' iniciado por Stack, Janeiro 31, 2025.

  1. Stack

    Stack Membro Participativo

    How to send blurred paid media in channel? Here is me code, but I cannot find solution https://docs.aiogram.dev/en/dev-3.x/api/types/input_media_photo.html

    import asyncio
    import logging
    from aiogram import Bot, Dispatcher
    from aiogram.filters import CommandStart
    from aiogram.types import Message, InputPaidMediaPhoto



    TOKEN = "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"


    PHOTO_URL = 'https://i.imgur.com/i2CvF2q.jpeg'

    logging.basicConfig(level=logging.INFO)
    logger = logging.getLogger(__name__)

    bot = Bot(token=TOKEN)
    dp = Dispatcher()


    @dp.message(CommandStart())
    async def command_start(message: Message):
    await message.answer_paid_media(star_count=500, media=[InputPaidMediaPhoto(media=PHOTO_URL)])


    async def main():
    await dp.start_polling(bot)

    if __name__ == '__main__':
    asyncio.run(main())

    Continue reading...

Compartilhe esta Página