fix shorturl.py

this module provides a botset export but doesn't check that
setting later when looking up configured shorteners

check bot_settings if context and server values are not set
This commit is contained in:
Ben Harris 2020-07-14 02:48:33 -04:00
parent 46944b0c09
commit d7e9714cec

View file

@ -48,9 +48,11 @@ class Module(ModuleManager.BaseModule):
shortener_name = None shortener_name = None
if context: if context:
shortener_name = context.get_setting("url-shortener", shortener_name = context.get_setting("url-shortener",
server.get_setting("url-shortener", "bitly")) server.get_setting("url-shortener",
self.bot.get_setting("url-shortener", "bitly")))
else: else:
shortener_name = server.get_setting("url-shortener", "bitly") shortener_name = server.get_setting("url-shortener",
self.bot.get_setting("url-shortener", "bitly"))
if shortener_name == None: if shortener_name == None:
return url return url