TypeError: client.on is not a function -node.js error

How do i fix this it keeps giving me the error TypeError: client.on is not a function

const DiscordPage = d;
await fill_discord(DiscordPage, username, password, email);

const client = d._client;
var token;

client.on('Network.webSocketFrameSent', ({requestId, timestamp, response}) => {
  try {
    const json = JSON.parse(response.payloadData);
    if(!token && json["d"]["token"]){
      token = json["d"]["token"];
      write_log(true, `Token: ${token}`);
    };
  } catch(e){};
})
await break_captcha(DiscordPage);