No username, no party
This commit is contained in:
@@ -367,6 +367,7 @@ async def handle_conjunta(update: Update, context: CallbackContext):
|
||||
if limit is not None and quantity > limit_per_user or limit is not None and quantity > quantity_left(conjunta_id):
|
||||
await update.message.reply_text("La cantidad deseada excede el límite por usuario de la conjunta o no quedan suficientes.")
|
||||
else:
|
||||
if user_name:
|
||||
cursor.execute("INSERT INTO conjunta_users (conjunta_id, user_id, user_name, quantity) VALUES (?, ?, ?, ?)",
|
||||
(conjunta_id, user_id, user_name, quantity))
|
||||
conn.commit()
|
||||
@@ -382,6 +383,8 @@ async def handle_conjunta(update: Update, context: CallbackContext):
|
||||
await update_conjunta(update, context, conjunta_id)
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
await update.message.reply_text("Por favor, tienes que ponerte un nick en Telegram para poder participar.")
|
||||
except ValueError:
|
||||
await update.message.reply_text("Por favor, introduce una cantidad válida.")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user