Added the option to !opt-in/opt-out [onlinebot only]

Fixed command & event threading
Events are now threaded by event_type (i.e. all buddy_logon events get ran in the same one)
Added default preferences
Fixed recipe loading for multiple installs (i.e. on different machines)
This commit is contained in:
2021-08-27 13:58:47 +02:00
parent d0c8c1744c
commit c04f76c0db
24 changed files with 258 additions and 122 deletions
+4 -4
View File
@@ -41,13 +41,13 @@ class CharacterHistoryService:
# with TorRequests() as tor_request:
# with tor_request.get_session(1) as session:
# r = session.get(url, timeout=5)
r = requests.get(url, timeout=5, headers={"User-Agent": self.bot.major_version})
result = r.json()
# r = requests.get(url, timeout=5, headers={"User-Agent": self.bot.major_version})
result = json.loads(r)
except ReadTimeout:
self.logger.warning("Timeout while requesting '%s'" % url)
self.logger.warning(f"Timeout while requesting '{url}'")
result = None
except Exception as e:
self.logger.error("Error requesting history for url '%s'" % url, e)
self.logger.error(f"Error requesting history for url '{url}'", e)
result = None
if result: