How to make a chatbot join a channel using JS?

I am using TMI.js. Here’s my code:

const tmi = require("tmi.js");
const fs = require("fs");

const settings = {
  options: {
    clientId: process.env.CLIENTID,
    debug: true
  },
  connection: {
    cluster: "aws",
    reconnect: true
  },
  identity: {
    username: "codiacbot",
    password: process.env.SECRET
  },
  channels: ["#codiacbot", "#sunsogtwitch"]
};

const client = new tmi.client(settings);

client.connect();