From ca27df7748af7554631066bd49e774c516022cd2 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 24 Feb 2022 08:49:50 -0500 Subject: [PATCH] test --- sopel_SpiceBot_Core_Prerun/__init__.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sopel_SpiceBot_Core_Prerun/__init__.py b/sopel_SpiceBot_Core_Prerun/__init__.py index 1d7e26c..2f21417 100644 --- a/sopel_SpiceBot_Core_Prerun/__init__.py +++ b/sopel_SpiceBot_Core_Prerun/__init__.py @@ -12,7 +12,16 @@ def prerun(rulematch=False): def internal_prerun(bot, trigger, *args, **kwargs): # trigger_type = [x for x in dir(function) if not x.startswith("__")][1] - print(function.command) + try: + print(function.commands) + except AttributeError: + try: + print(function.nickname_commands) + except AttributeError: + try: + print(function.action_commands) + except AttributeError: + print("nothing here") # Get list of trigger command(s) by && split commands = sb.commands.get_commands_split(trigger, "&&")