From 6a87d31444ca8785a41d2e6660f4ad53cc078442 Mon Sep 17 00:00:00 2001 From: Frisk Date: Sat, 11 Apr 2020 12:53:42 +0200 Subject: [PATCH] Added #109 --- configloader.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configloader.py b/configloader.py index 40435c7..ba667c8 100644 --- a/configloader.py +++ b/configloader.py @@ -11,3 +11,12 @@ except FileNotFoundError: logging.critical("No config file could be found. Please make sure settings.json is in the directory.") sys.exit(1) +# Set the cooldown to 15 seconds if it's a wiki farm like Fandom or Gamepedia and the cooldown is even lower than that. +# Look, it's unreasonable to have even higher refresh rate than that, seriously. Setting it even lower can cause issues +# for all users of the script for high usage of farm's servers. So please, do not remove this code unless you absolutely +# know what you are doing <3 +if any(("fandom.com" in settings["wiki_url"], "gamepedia.com" in settings["wiki_url"])): + if settings["cooldown"] < 15: + settings["cooldown"] = 15 +if settings["fandom_discussions"]["cooldown"] < 15: + settings["fandom_discussions"]["cooldown"] = 15