The token indeed has “chat:edit”.
The code is logging any messages that are thrown at it. I have tried “WHO something” and it returns a 421, as expected. On “PRIVMSG”, however, nothing at all is returned by the server.
The account has all the rights to write in the channel, I made sure of it. Also, my own channel I can surely write in, yet the messages still won’t appear.
Here’s my code, just in case:
const WebSocket = require('ws');
const connection = new WebSocket("ws://irc-ws.chat.twitch.tv:80");
connection.onopen = (event) => {
console.log("Open")
connection.send(`PASS oauth:<token>`)
connection.send(`NICK gethrchat`)
connection.send("JOIN #gethrchat")
connection.send("PRIVMSG #gethrchat :Hey!")
}
connection.onmessage = (event) => {
console.log(event.data)
}