From d7b16e9e0790db8a3cba76c8cda9e83f4af0f347 Mon Sep 17 00:00:00 2001 From: Frisk Date: Tue, 2 Feb 2021 02:28:14 +0100 Subject: [PATCH] wrote 4 lines for discussions, after a long break <3 --- src/bot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bot.py b/src/bot.py index 3ef51e5..d8012db 100644 --- a/src/bot.py +++ b/src/bot.py @@ -381,6 +381,10 @@ async def discussion_handler(): fetch_all = db_cursor.execute( "SELECT wiki, rcid, postid FROM rcgcdw WHERE postid != '-1' OR postid IS NULL GROUP BY wiki") for db_wiki in fetch_all.fetchall(): + if db_wiki["wiki"] not in rcqueue.irc_mapping["fandom.com"].updated_discussions and all_wikis[db_wiki["wiki"]].last_updated+settings["irc_overtime"] > time.time(): # I swear if another wiki farm ever starts using Fandom discussions I'm gonna use explosion magic + continue + else: + rcqueue.irc_mapping["fandom.com"].updated_discussions.remove(db_wiki["wiki"]) header = settings["header"] header["Accept"] = "application/hal+json" async with aiohttp.ClientSession(headers=header,