Return the maximum ID of all abuse log entries instead of the last ID.

This fixes an issue where abuse log entries are returned out of order from the
API, leading to constantly repeating abuse filter messages being sent to
Discord.
This commit is contained in:
Pera Pisar 2024-03-11 18:13:14 +00:00
parent d4d50d3529
commit de937dc2f3

View file

@ -232,7 +232,7 @@ class Wiki(object):
if entry["id"] <= recent_id:
continue
self.abuse_processor(entry)
return entry["id"]
return max([entry["id"] for entry in abuse_log])
def fetch_changes(self, amount):
"""Fetches the :amount: of changes from the wiki.