This commit is contained in:
deathbybandaid 2022-02-10 13:22:53 -05:00
parent f4585e0c43
commit e2f3426a69
3 changed files with 23 additions and 44 deletions

View File

@ -1,14 +1,27 @@
__all__ = []
import pkgutil
import inspect
for loader, name, is_pkg in pkgutil.walk_packages(__path__): from sopel import plugin
module = loader.find_module(name).load_module(name)
for name, value in inspect.getmembers(module): from sopel_SpiceBot_Core_1 import sb
if name.startswith('__'):
continue
globals()[name] = value from sopel_SpiceBot_Core_Prerun import prerun_nickname_command
__all__.append(name)
@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)

View File

@ -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)

View File

@ -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)