Skip to content

Fix showing thumb when sending document (#389) #391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2020
Merged

Fix showing thumb when sending document (#389) #391

merged 1 commit into from
Jul 26, 2020

Conversation

Abstract-X
Copy link

@Abstract-X Abstract-X commented Jul 25, 2020

Description

import asyncio
from aiogram import Bot
from aiogram.types import InputFile

BOT_TOKEN = "..."
CHAT_ID = ...

async def main():
    bot = Bot(token=BOT_TOKEN)
    await bot.send_document(chat_id=CHAT_ID,
                            document=InputFile("document.zip"),
                            thumb=InputFile("thumb.jpg"))
    await bot.close()

asyncio.run(main())

image

Fixes #389

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@JrooTJunior JrooTJunior merged commit d1452b1 into aiogram:dev-2.x Jul 26, 2020
uburuntu pushed a commit to uburuntu/aiogram that referenced this pull request Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

answer_document and reply_document missing "thumb" parameter
2 participants