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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user