Prevent unneeded updates

This commit is contained in:
Alexander Dörflinger
2025-12-12 09:53:40 +01:00
parent 399dba03ec
commit 8706ab9f53

View File

@@ -213,7 +213,6 @@ class ChristmasBot:
now = time.time()
if now - self.last_dashboard_update < config.update_post_interval: return
print("📝 Updating Forest Dashboard...")
data = self.db.get_forest_data()
if self.last_updated_data and self.last_updated_data == data:
@@ -221,6 +220,8 @@ class ChristmasBot:
print(f"No change in dashboard, last checked {now}...", end="\r")
return
print("📝 Updating Forest Dashboard...")
body = "# 🎄 The Christmas Forest 🎄\n\n"
body += "### How to Participate:\n"
body += "1. Send a DM to u/{}\n".format(config.username)