add an error message to points read too

This commit is contained in:
Lili (Tlapka) 2023-01-05 14:32:53 +01:00
parent 543dc3e5b9
commit 85c4df9250
1 changed files with 4 additions and 1 deletions

View File

@ -39,7 +39,10 @@ def owncast_webhook():
send_help() send_help()
elif data["eventData"]["body"].startswith(f"{prefix}points"): elif data["eventData"]["body"].startswith(f"{prefix}points"):
points = read_users_points(db, user_id) points = read_users_points(db, user_id)
send_chat(f"{display_name}'s points: {points}") if points is None:
send_chat("Error reading points.")
else:
send_chat(f"{display_name}'s points: {points}")
elif data["eventData"]["body"].startswith(f"{prefix}name_update"): elif data["eventData"]["body"].startswith(f"{prefix}name_update"):
# Forces name update in case bot didn't catch the NAME_CHANGE # Forces name update in case bot didn't catch the NAME_CHANGE
# event. Also removes saved usernames from users with same name # event. Also removes saved usernames from users with same name