Merge pull request #8 from deathbybandaid/development

Development
This commit is contained in:
Deathbybandaid 2019-05-02 20:23:07 -04:00 committed by GitHub
commit 65a459ff6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,8 +12,7 @@ from operator import itemgetter
import threading
from sopel_modules.SpiceBot_SBTools.BotEvents import set_bot_event
from sopel_modules.SpiceBot_Botevents.BotEvents import set_bot_event
import spicemanip
@ -50,11 +49,12 @@ def setup_thread(bot):
# pypi installed
try:
import sopel_modules
pypi_modules = os.path.dirname(os.path.abspath(sopel_modules.__file__))
pypi_modules_dir = os.path.join(pypi_modules, 'modules')
filepathlisting.append(pypi_modules_dir)
except Exception:
pass
for plugin_dir in set(sopel_modules.__path__):
for pathname in os.listdir(plugin_dir):
pypi_modules_dir = os.path.join(plugin_dir, pathname)
filepathlisting.append(pypi_modules_dir)
except Exception as e:
stderr("[Sopel-CommandsQuery] sopel_modules not loaded :" + str(e))
# Extra directories
filepathlist = []
@ -159,7 +159,6 @@ def query_detection(bot, trigger):
# command must start with
if not str(trigger).startswith(tuple(['?'])):
return
stderr(trigger.args)
commands_list = dict()
for commandstype in bot.memory['Sopel-CommandsQuery'].keys():