Exemplo n.º 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))
Exemplo n.º 2
0
 def __init__(self, tests=()):
     Extension.__init__(self, tests)