I an trying to join multiple twitch channels but i keep getting this code Error : no response from twitch

Does anyone knowledgeable advice regarding this error code. It runs well for about 5 min then gives the error

Here is my script im using.

var tmi = require("tmi.js");
var config = require("./config");

if (config.username && config.token && config.channels) {
    var channels = [];
    for (i = 0; i < config.channels.length; i++) {
        channels.push("#" + config.channels[i]);
    };

    var options = {
        connection: {
            reconnect: true,
            secure: true
        },
        identity: {
            username: config.username,
            password: config.token
        },
        channels: channels
    };

    const getCurrentTime = () => {
        var currentDate = new Date();
        var dateTime = "[" + currentDate.getFullYear() + "-" + (("0" + (currentDate.getMonth() + 1)).slice(-2)) + "-" + (("0" + currentDate.getDate()).slice(-2)) + " " + (("0" + currentDate.getHours()).slice(-2)) + ":" + (("0" + currentDate.getMinutes()).slice(-2)) + ":" + (("0" + currentDate.getSeconds()).slice(-2)) + "] ";
        return dateTime;
    };
    
    var client = new tmi.client(options);
    client.connect();

    client.on("logon", () => {
        console.log(getCurrentTime() + "Connected to the Twitch server as " + config.username + ".");
    });
    client.on("join", (channel, username) => {
        if (username == config.username) {
            console.log(getCurrentTime() + "Joined " + channel + ".");
        }
    });
    client.on("subgift", (channel, username, streakMonths, recipient) => {
        if (recipient == config.username) {
            console.log(getCurrentTime() + "Received a subscription gift from user " + username + " in " + channel + "!");
        }
    });
    client.on("reconnect", () => {
        console.log(getCurrentTime() + "Trying to reconnect to the Twitch server...");
    });
    client.on("part", (channel, username) => {
        if (username == config.username) {
            console.log(getCurrentTime() + "Disconnected from " + channel + ".");
        }
    });
    client.on("disconnected", (reason) => {
        console.log(getCurrentTime() + "Disconnected from the Twitch server. Reason: " + reason + ".");
    });
} else {
    console.error("You need to fill out all fields in the config file.");
};




module.exports = {
  username: "Youdiscover",
  token: "oauth:REMOVED",
  channels: [
    "1frame",
    "PlayerOne",
    "0trumajestic0",
    "102_fahrenheit",
    "11mrkartrm09",
    "15_warior",
    "19thalphabet_",
    "1deathequal10pushups",,
    "1stofjune",
	  ]
};

I removed your token for you. It is a “password” and should not be posted publically

O goodness i forgot about that thanks alot

As to your actual issue. I don’t use tmi.js myself.

But all channel names should be lowercase, as should your username/login name.

You should see about adding additional logging to track any and all errors. And/or dump out the raw responses Twitch send to help track down the problem

Hi barry thanks for the advice i will give it a go

So far so good . Its working i hope it stays stable. Thanks for the help