finished JSON parsing

This commit is contained in:
2025-02-16 01:28:15 +01:00
parent fa5d391a9f
commit bbc99a4ba3
3 changed files with 67 additions and 15 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ def add_post_to_data(bot: botPy.Bot, new_data: PostData, bypass_conditions: bool
py_print(f"Added post \"{new_data.url}\" (Conditions bypassed)")
return True
if new_data.url not in bot.data[BK_WEEKLY]:
if new_data.url not in bot.data[BK_WEEKLY] or new_data.upvotes != bot.data[BK_WEEKLY][new_data.url]["post_data"]:
bot.data[BK_WEEKLY][new_data.url] = new_data.to_json()
if bot.args["dev"]:
py_print(f"Added post \"{new_data.url}\"")