DEV Community

Discussion on: Twitch IRC Capability WebSocket (help)

Collapse
 
zaekof profile image
NOGIER Loïc

It is a right way to do what i want ?

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

let options = {
  options: {
    debug: true,
    clientId: '...'
  },
  connection: {
    server: 'irc-ws.chat.twitch.tv',
    reconnect: true,
    secure: true
  },
  identity: {
    username: "zaekof_",
    password: "oauth:..."
  },
  channels: [ "#zaekof_" ]
};

let client = new tmi.client(options);

client.on("notice", (channel, msgid, message) => {
  console.log(msgid, message);
});

client.connect();

I didn't have any return when i use /unban in chat, just :

[16:34] info: [#zaekof_] ... has been banned.

I'm confused, I must have missed something ^

Thread Thread
 
flozero profile image
florent giraud

you have to put the ids from the bot or you depend and ban from this user you or the bot because it will listen commands from the ids you enter client secret or id