More changes

This commit is contained in:
Joan
2025-09-17 17:05:46 +02:00
parent 65b8542791
commit 16776f8766
4 changed files with 6 additions and 5 deletions

View File

@@ -220,13 +220,14 @@ async def confirm_creation(update: Update, context: ContextTypes.DEFAULT_TYPE) -
price = user_data.get('price')
image_file_id = user_data.get('image_file_id')
channel_id = user_data.get('channel')
international_shipping = user_data.get('international_shipping', 0)
if not all([name, description, image_file_id, price]):
if not all([name, description, image_file_id, price, international_shipping]):
await context.bot.send_message(query.from_user.id, "Faltan datos. Creación cancelada.")
context.user_data.pop('new_raffle', None)
return ConversationHandler.END
raffle_id = create_raffle(name, description, price, image_file_id, channel_id)
raffle_id = create_raffle(name, description, price, image_file_id, channel_id, international_shipping)
if raffle_id:
await context.bot.send_message(query.from_user.id, f"✅ ¡Sorteo '{name}' creado con éxito!")