I am using WebSocketSharp to connect to the chat.
When I connect via ws://irc-ws.chat.twitch.tv:80, I can send messages, but no messages sent by other users are being returned.
When I try to connect via ws://irc.chat.twitch.tv:6667, as suggested in the documentation, I get an error.
Fatal|WebSocket.doHandshake|Not a WebSocket handshake response.
So, working with the url that works, I can send messages just fine and they appear in my channel. (I am joining the channel all in lowercase)
This code resides in my OnConnected handler and is triggered and works successfully with the irc-ws.chat.twitch.tv endpoint.
socket.Send(RFC2812Commands.Password(TwitchSettings.Default.BotOAuthToken));
socket.Send(RFC2812Commands.Nickname(TwitchSettings.Default.BotUsername));
socket.Send("CAP REQ twitch.tv/membership");
socket.Send("CAP REQ twitch.tv/commands");
socket.Send("CAP REQ twitch.tv/tags");
if (autoJoinDefaultChannel)
{
JoinChannel(TwitchSettings.Default.TwitchChannelName);
}
I have an OnMessage handler set up, but any time another users posts to the chat, I do not get messages. However, posting a message from my code will show the message in chat.