Removed list of users from updating the pinned message

This commit is contained in:
Joan
2023-11-13 13:39:18 +01:00
parent 60aa369baf
commit 2198f42fc0

View File

@@ -402,12 +402,12 @@ async def update_conjunta(update: Update, context: CallbackContext, conjunta_id)
cursor.execute("SELECT * FROM conjunta_users WHERE conjunta_id=?", (conjunta_id,))
users = cursor.fetchall()
if users:
message += f"\n🧍 Lista de apuntados:\n\n"
for user in users:
id, conjunta_id, user_id, user_name, quantity = user
quantity_string = "unidades" if quantity > 1 else "unidad"
message += f"@{user_name} - {quantity} {quantity_string}\n"
#if users:
# message += f"\n🧍 Lista de apuntados:\n\n"
# for user in users:
# id, conjunta_id, user_id, user_name, quantity = user
# quantity_string = "unidades" if quantity > 1 else "unidad"
# message += f"@{user_name} - {quantity} {quantity_string}\n"
if (int(time.time()) - int(message_date)) < (24 * 3600 * 2): # borramos el mensaje si tiene más de 1 día
logging.info(f"Updating message for {product_name} - {conjunta_id}")