def use(self, *middleware: Middleware):
        """
        Registers middleware plugin(s) with the bot or set.
        :param middleware :
        :return:
        """
        for (idx, m) in enumerate(middleware):
            if hasattr(m, 'on_process_request') and callable(m.on_process_request):
                self._middleware.append(m)
                return self
            else:
                raise TypeError('MiddlewareSet.use(): invalid middleware at index "%s" being added.' % idx)
def use(self, *middleware: Middleware):
        """
        Registers middleware plugin(s) with the bot or set.
        :param middleware :
        :return:
        """
        for (idx, m) in enumerate(middleware):
            if hasattr(m, 'on_process_request') and callable(m.on_process_request):
                self._middleware.append(m)
                return self
            else:
                raise TypeError('MiddlewareSet.use(): invalid middleware at index "%s" being added.' % idx)
def use ( self , * middleware : Middleware ) : for ( idx , m ) in enumerate ( middleware ) : if hasattr ( m , 'on_process_request' ) and callable ( m . on_process_request ) : self . _middleware . append ( m ) return self else : raise TypeError ( 'MiddlewareSet.use(): invalid middleware at index "%s" being added.' % idx )
Registers middleware plugin(s) with the bot or set.
        :param middleware :
        :return:
Registers middleware plugin ( s ) with the bot or set . : param middleware : : return :