Check for empty as well
This commit is contained in:
@@ -215,13 +215,13 @@ class ChristmasBot:
|
|||||||
|
|
||||||
data = self.db.get_forest_data()
|
data = self.db.get_forest_data()
|
||||||
|
|
||||||
if self.last_updated_data and len(self.last_updated_data) == len(data):
|
if self.last_updated_data and (len(self.last_updated_data) == len(data) or len(data) == 0):
|
||||||
# Nothing changed.
|
# Nothing changed.
|
||||||
print(f"No change in dashboard, last checked {now}...", end="\r")
|
print(f"No change in dashboard, last checked {now}...", end="\r")
|
||||||
return
|
return
|
||||||
|
|
||||||
print("📝 Updating Forest Dashboard...")
|
print("📝 Updating Forest Dashboard...")
|
||||||
|
self.last_updated_data = data
|
||||||
body = "# 🎄 The Christmas Forest 🎄\n\n"
|
body = "# 🎄 The Christmas Forest 🎄\n\n"
|
||||||
body += "### How to Participate:\n"
|
body += "### How to Participate:\n"
|
||||||
body += "1. Send a DM to u/{}\n".format(config.username)
|
body += "1. Send a DM to u/{}\n".format(config.username)
|
||||||
|
|||||||
Reference in New Issue
Block a user