Syntax Error Help Javascript

I keep getting a syntax error while trying to run this javastript code on ‘line 16 (line starting with “const”) char 1’ but I cannot find the issue. This is supposed to be code for a twitch lurk bot. Removed my user & pass for obvious reasons.

var options = {
    options: {
        debug: false
    },
    connection: {
        reconnect: true,
        port: 443,
        timeout: 30000
    }, 
    identity: {
        username: "",
        password: ""
    },
    channels: ["nosebleedgg", "dakotaz", "shroud", "lirik", "summit1g"]
};
const client = new TwitchJS.client(options);
client.connect();
            client.on("chat", function (channel, user, action, self) {
                if (self) {
                  return;
                 }   else if (client.getChannels().includes('#'+user.username)) {
                      return;       
                  }   else {
                    client.join(user.username)
                        .catch(err => console.log(err));
                            console.log(client.getChannels().length);
};
});

I am not seeing any obvious syntax issues with what you have posted here. What is the exact error message showing?