Hello,
I am trying to connect a bot to its own channel, to read and edit messages. The authentication token seems valid:
But when connecting, it says:
[18:57] info: Connecting to irc-ws.chat.twitch.tv on port 443…
[18:57] info: Sending authentication to server…
[18:57] error: Login authentication failed
Here is the code I’m using:
const tmi = require('tmi.js');
// Define configuration options
const opts = {
options: { debug: true},
identity: {
username: 'krawfbot',
password: 'oath:mytoken'
},
channels: [ 'krawfbot' ]
};
// Create a client with our options
const client = new tmi.client(opts);
// Connect to Twitch:
client.connect();