Need help with tmi.js errors

I am building my first bot and am trying to get it connected to my channel. My code says I am connected to chat. I can even console log the chat with no issue, but my bot does not appear in my chat list and I cannot send messages to my chat.

Edit: Here is my code and the console output

Please post your code that shows connected to and joining a channel.

I edited my original post and included a link to my code

Check out the TMI.js documentation here:

twitchBot.say(twitchChannel, "message").then(function(data) {
}).catch(function(err) {

Also that say method might fire too early, before you client has successfully logged in.
Try placing it inside the connection event.

Basically DBKynd is correct. You’re calling the action function before a connection had even been made.

I recommend after the connected event or the join event:

twitchBot.on('join', (channel, username, self) => {
    if(self) {
        twitchBot.action(channel, 'Joined.')
            .catch(err => console.log(err));

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.