예제 #1
0
    def __init__(self, *args, **kwargs):
        Extension.__init__(self, *args, **kwargs)

        # register all commands from the commands package
        self.commands = []
        for ActiveCommand in commands.__dict__.values():
            if isinstance(ActiveCommand, type) and \
               issubclass(ActiveCommand, Command):
                self.commands.append(ActiveCommand(self.bot))

        # use UniversalCommand as fallback
        self.commands.append(UniversalCommand(self.bot))
예제 #2
0
 def __init__(self, tests=()):
     Extension.__init__(self, tests)