From e2f3426a694afdd3e288e4c0d4b4f8b52862e73c Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 10 Feb 2022 13:22:53 -0500 Subject: [PATCH] test --- sopel_SpiceBot_Runtime_Commands/__init__.py | 33 +++++++++++++------ sopel_SpiceBot_Runtime_Commands/fartcom.py.py | 17 ---------- sopel_SpiceBot_Runtime_Commands/testcom.py.py | 17 ---------- 3 files changed, 23 insertions(+), 44 deletions(-) delete mode 100644 sopel_SpiceBot_Runtime_Commands/fartcom.py.py delete mode 100644 sopel_SpiceBot_Runtime_Commands/testcom.py.py diff --git a/sopel_SpiceBot_Runtime_Commands/__init__.py b/sopel_SpiceBot_Runtime_Commands/__init__.py index fb28c7f..5423cef 100644 --- a/sopel_SpiceBot_Runtime_Commands/__init__.py +++ b/sopel_SpiceBot_Runtime_Commands/__init__.py @@ -1,14 +1,27 @@ -__all__ = [] -import pkgutil -import inspect -for loader, name, is_pkg in pkgutil.walk_packages(__path__): - module = loader.find_module(name).load_module(name) +from sopel import plugin - for name, value in inspect.getmembers(module): - if name.startswith('__'): - continue +from sopel_SpiceBot_Core_1 import sb - globals()[name] = value - __all__.append(name) +from sopel_SpiceBot_Core_Prerun import prerun_nickname_command + + +@prerun_nickname_command() +@plugin.nickname_command('test') +def sb_nickname_command(bot, trigger): + bot.say("Testing the bot") + bot.say("Attributes: %s" % [x for x in dir(sb) if not x.startswith("__")]) + bot.say("%s" % sb.versions.dict) + + sb.osd("test", trigger.sender) + + +@prerun_nickname_command() +@plugin.nickname_command('fart') +def sb_fart_command(bot, trigger): + bot.say("Testing the bot") + bot.say("Attributes: %s" % [x for x in dir(sb) if not x.startswith("__")]) + bot.say("%s" % sb.versions.dict) + + sb.osd("test", trigger.sender) diff --git a/sopel_SpiceBot_Runtime_Commands/fartcom.py.py b/sopel_SpiceBot_Runtime_Commands/fartcom.py.py deleted file mode 100644 index f69c0db..0000000 --- a/sopel_SpiceBot_Runtime_Commands/fartcom.py.py +++ /dev/null @@ -1,17 +0,0 @@ - - -from sopel import plugin - -from sopel_SpiceBot_Core_1 import sb - -from sopel_SpiceBot_Core_Prerun import prerun_nickname_command - - -@prerun_nickname_command() -@plugin.nickname_command('fart') -def sb_fart_command(bot, trigger): - bot.say("Testing the bot") - bot.say("Attributes: %s" % [x for x in dir(sb) if not x.startswith("__")]) - bot.say("%s" % sb.versions.dict) - - sb.osd("test", trigger.sender) diff --git a/sopel_SpiceBot_Runtime_Commands/testcom.py.py b/sopel_SpiceBot_Runtime_Commands/testcom.py.py deleted file mode 100644 index f69c0db..0000000 --- a/sopel_SpiceBot_Runtime_Commands/testcom.py.py +++ /dev/null @@ -1,17 +0,0 @@ - - -from sopel import plugin - -from sopel_SpiceBot_Core_1 import sb - -from sopel_SpiceBot_Core_Prerun import prerun_nickname_command - - -@prerun_nickname_command() -@plugin.nickname_command('fart') -def sb_fart_command(bot, trigger): - bot.say("Testing the bot") - bot.say("Attributes: %s" % [x for x in dir(sb) if not x.startswith("__")]) - bot.say("%s" % sb.versions.dict) - - sb.osd("test", trigger.sender)