src/connection-handler.js
function connectApp(token) {
  const CONNECTION = new Connection();

  return new Promise((resolve, reject) => {
    CONNECTION.connect(token)
      .then(() => resolve(new ConnectionHandler(CONNECTION)))
      .catch((error) => reject(error));
  });
}
function connectApp(token) {
  const CONNECTION = new Connection();

  return new Promise((resolve, reject) => {
    CONNECTION.connect(token)
      .then(() => resolve(new ConnectionHandler(CONNECTION)))
      .catch((error) => reject(error));
  });
}
function connectApp ( token ) { const CONNECTION = new Connection ( ) ; return new Promise ( ( resolve , reject ) => { CONNECTION . connect ( token ) . then ( ( ) => resolve ( new ConnectionHandler ( CONNECTION ) ) ) . catch ( ( error ) => reject ( error ) ) ; } ) ; }
Re-connects an App with a valid token.
@param {string} token - Auth token.
@returns {Promise}
Re - connects an App with a valid token .