redeems dashboard improvement
This commit is contained in:
parent
796febb91f
commit
5c6b070a7a
|
@ -20,14 +20,16 @@ def handle_redeem(message, user_id):
|
||||||
if use_points(db, user_id, price):
|
if use_points(db, user_id, price):
|
||||||
if redeem_type == "counter":
|
if redeem_type == "counter":
|
||||||
add_to_counter(db, redeem)
|
add_to_counter(db, redeem)
|
||||||
|
send_chat(f"{redeem} redeemed for {price} points.")
|
||||||
elif redeem_type == "list":
|
elif redeem_type == "list":
|
||||||
add_to_redeem_queue(db, user_id, redeem)
|
add_to_redeem_queue(db, user_id, redeem)
|
||||||
|
send_chat(f"{redeem} redeemed for {price} points.")
|
||||||
elif redeem_type == "note":
|
elif redeem_type == "note":
|
||||||
if note is not None:
|
if note is not None:
|
||||||
add_to_redeem_queue(db, user_id, redeem, note)
|
add_to_redeem_queue(db, user_id, redeem, note)
|
||||||
|
send_chat(f"{redeem} redeemed for {price} points.")
|
||||||
else:
|
else:
|
||||||
send_chat(f"Cannot redeem {redeem}, no note included.")
|
send_chat(f"Cannot redeem {redeem}, no note included.")
|
||||||
send_chat(f"{redeem} redeemed for {price} points.")
|
|
||||||
else:
|
else:
|
||||||
send_chat(f"{redeem} not redeemed because of an error.")
|
send_chat(f"{redeem} not redeemed because of an error.")
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -35,8 +35,10 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<td>{{ row[0].replace(tzinfo=utc_timezone).astimezone().strftime("%H:%M") }}</td>
|
<td>{{ row[0].replace(tzinfo=utc_timezone).astimezone().strftime("%H:%M") }}</td>
|
||||||
<td>{{ row[1] }}</td>
|
<td>{{ row[1] }}</td>
|
||||||
<td>{{ row[2] }}</td>
|
|
||||||
<td>{{ row[3] }}</td>
|
<td>{{ row[3] }}</td>
|
||||||
|
{% if row[2] %}
|
||||||
|
<td>{{ row[2] }}</td>
|
||||||
|
{% endif %}
|
||||||
</tbody>
|
</tbody>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in New Issue