diff --git a/.gitignore b/.gitignore index d41efc8..ad92649 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,4 @@ coverage.xml # Sphinx documentation docs/_build/ +extensions/__pycache__/core.cpython-38.pyc diff --git a/extensions/utils/logging.py b/extensions/utils/logging.py index 88a2560..b0b8d23 100644 --- a/extensions/utils/logging.py +++ b/extensions/utils/logging.py @@ -22,28 +22,25 @@ class Logging(): # Sets info hook first self.info_hook = self.online.get_webhook( - bot.config['HOOKS']['INFO_HOOK'] - if bot.config['HOOKS']['INFO_HOOK'] + bot.config['HOOKS']['INFO_HOOK']) \ + if bot.config['HOOKS']['INFO_HOOK'] \ else None - ) + # Sets other hooks or defaults them if self.info_hook: self.warn_hook = self.online.get_webhook( - bot.config['HOOKS']['WARN_HOOK'] - if bot.config['HOOKS']['WARN_HOOK'] + bot.config['HOOKS']['WARN_HOOK']) \ + if bot.config['HOOKS']['WARN_HOOK'] \ else self.info_hook - ) self.error_hook = self.online.get_webhook( - bot.config['HOOKS']['ERROR_HOOK'] - if bot.config['HOOKS']['ERROR_HOOK'] + bot.config['HOOKS']['ERROR_HOOK']) \ + if bot.config['HOOKS']['ERROR_HOOK'] \ else self.info_hook - ) self.debug_hook = self.online.get_webhook( - bot.config['HOOKS']['DEBUG_HOOK'] - if bot.config['HOOKS']['DEBUG_HOOK'] + bot.config['HOOKS']['DEBUG_HOOK']) \ + if bot.config['HOOKS']['DEBUG_HOOK'] \ else self.info_hook - ) # If no hooks, nothing is there else: