passing a client instance to ready.then