# Path: cardinal/decorators.py
# def command(triggers):
#     if isinstance(triggers, str):
#         triggers = [triggers]
# 
#     if not isinstance(triggers, list):
#         raise TypeError("Command must be a trigger string or list of triggers")
# 
#     def wrap(f):
#         f.commands = triggers
#         return f
# 
#     return wrap
# 
# def help(lines):
#     # For backwards compatibility
#     if isinstance(lines, str):
#         lines = [lines]
# 
#     if not isinstance(lines, list):
#         raise TypeError("Help must be a help string or list of help strings")
# 
#     def wrap(f):
#         # Create help list or prepend to it
#         if not hasattr(f, 'help'):
#             f.help = lines
#         else:
#             f.help = lines + f.help
# 
#         return f
# 
#     return wrap


from datetime import datetime
from cardinal.decorators import command, help
        commands = []

        # Loop through commands registered in Cardinal
        for plugin in cardinal.plugin_manager:
            for cmd in plugin['commands']:
                if hasattr(cmd, 'commands'):
                    commands.append(cmd.commands[0])
                elif hasattr(cmd, 'name'):
                    commands.append(cmd.name)

        return commands

    # Gets the help text out of the Cardinal instance for a given command
    def _get_command_help(self, cardinal, help_command):
        help_text = 'No help found for that command.'

        # Check each module for the command being searched for
        for plugin in cardinal.plugin_manager:
            found_command = False

            for cmd in plugin['commands']:
                # Check if the command responds with the command the user
                # requested
                if hasattr(cmd, 'commands') and \
                        help_command in cmd.commands:
                    found_command = cmd
                    break

            # If the command was found and has a help file, set the help_text
            if found_command and hasattr(found_command, 'help'):

# Path: cardinal/decorators.py
# def command(triggers):
#     if isinstance(triggers, str):
#         triggers = [triggers]
# 
#     if not isinstance(triggers, list):
#         raise TypeError("Command must be a trigger string or list of triggers")
# 
#     def wrap(f):
#         f.commands = triggers
#         return f
# 
#     return wrap
# 
# def help(lines):
#     # For backwards compatibility
#     if isinstance(lines, str):
#         lines = [lines]
# 
#     if not isinstance(lines, list):
#         raise TypeError("Help must be a help string or list of help strings")
# 
#     def wrap(f):
#         # Create help list or prepend to it
#         if not hasattr(f, 'help'):
#             f.help = lines
#         else:
#             f.help = lines + f.help
# 
#         return f
# 
#     return wrap


# Path: plugins/help/plugin.py
from datetime import datetime
from cardinal.decorators import command, help

        commands = []

        # Loop through commands registered in Cardinal
        for plugin in cardinal.plugin_manager:
            for cmd in plugin['commands']:
                if hasattr(cmd, 'commands'):
                    commands.append(cmd.commands[0])
                elif hasattr(cmd, 'name'):
                    commands.append(cmd.name)

        return commands

    # Gets the help text out of the Cardinal instance for a given command
    def _get_command_help(self, cardinal, help_command):
        help_text = 'No help found for that command.'

        # Check each module for the command being searched for
        for plugin in cardinal.plugin_manager:
            found_command = False

            for cmd in plugin['commands']:
                # Check if the command responds with the command the user
                # requested
                if hasattr(cmd, 'commands') and \
                        help_command in cmd.commands:
                    found_command = cmd
                    break

            # If the command was found and has a help file, set the help_text
            if found_command and hasattr(found_command, 'help'):

                help_text = found_command.help