Stores the photo and asks for a location.
(update: Update, context: ContextTypes.DEFAULT_TYPE)
| 68 | |
| 69 | |
| 70 | async def photo(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int: |
| 71 | """Stores the photo and asks for a location.""" |
| 72 | user = update.message.from_user |
| 73 | photo_file = await update.message.photo[-1].get_file() |
| 74 | await photo_file.download_to_drive("user_photo.jpg") |
| 75 | logger.info("Photo of %s: %s", user.first_name, "user_photo.jpg") |
| 76 | await update.message.reply_text( |
| 77 | "Gorgeous! Now, send me your location please, or send /skip if you don't want to." |
| 78 | ) |
| 79 | |
| 80 | return LOCATION |
| 81 | |
| 82 | |
| 83 | async def skip_photo(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int: |
nothing calls this directly
no test coverage detected
searching dependent graphs…