remove old/unnecessary checks
This commit is contained in:
parent
26f7706b2d
commit
ed79404530
|
@ -20,11 +20,9 @@ def owncast_webhook():
|
||||||
old_names = data["eventData"]["user"]["previousNames"]
|
old_names = data["eventData"]["user"]["previousNames"]
|
||||||
change_display_name(db, user_id, new_name)
|
change_display_name(db, user_id, new_name)
|
||||||
elif data["type"] == "CHAT":
|
elif data["type"] == "CHAT":
|
||||||
if data["eventData"]["visible"]:
|
|
||||||
user_id = data["eventData"]["user"]["id"]
|
user_id = data["eventData"]["user"]["id"]
|
||||||
display_name = data["eventData"]["user"]["displayName"]
|
display_name = data["eventData"]["user"]["displayName"]
|
||||||
print("New chat message:")
|
print(f'New chat message from {display_name}:')
|
||||||
print(f'from {display_name}:')
|
|
||||||
print(f'{data["eventData"]["body"]}')
|
print(f'{data["eventData"]["body"]}')
|
||||||
if "!help" in data["eventData"]["body"]:
|
if "!help" in data["eventData"]["body"]:
|
||||||
message = """Tlapbot commands:
|
message = """Tlapbot commands:
|
||||||
|
@ -54,11 +52,4 @@ def owncast_webhook():
|
||||||
change_display_name(db, user_id, display_name)
|
change_display_name(db, user_id, display_name)
|
||||||
elif "!clear" in data["eventData"]["body"]:
|
elif "!clear" in data["eventData"]["body"]:
|
||||||
clear_redeem_queue(db)
|
clear_redeem_queue(db)
|
||||||
elif "!queue" in data["eventData"]["body"]:
|
|
||||||
queue = pretty_redeem_queue(db)
|
|
||||||
print("timestamp | redeem | redeemer")
|
|
||||||
for row in queue:
|
|
||||||
print(row[0], " ", row[1], " ", row[2])
|
|
||||||
# else: # DEBUG: give points for message
|
|
||||||
# give_points_to_chat(db)
|
|
||||||
return data
|
return data
|
Loading…
Reference in New Issue