![]() |
|
[.NET] Read Twitch Chat (Not for a Bot) - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Read Twitch Chat (Not for a Bot) (/showthread.php?tid=5040485) |
Read Twitch Chat (Not for a Bot) - Mаestro - Oct 30, 2015 Hey guys, I've been working on a project to further my knowledge and I've run into a snag and can't find anything on how to do this. Anyway, I just want to get the chat text itself not be able to send messages or bot, so I can have the twitch chat in an application. Twitch had said it is HTML5 and Irc so I guess you could go somewhere with that? Don't want the code written for me just an informational page or something to jump start me in the direction I need. Thanks. * - stratex - Oct 30, 2015 https://github.com/justintv/Twitch-API/blob/master/IRC.md If you need more help in implementing I can post some code. * - BahNahNah - Oct 31, 2015 Irc uses TCP. Using a TCPClient to connect and StreamReader to read is the easiest way. Here is an example if you want one. * - Josh - Nov 2, 2015 You will need: • A method of connecting to an IRC server, so manually handing a TCPClient or a library • A twitch account, complete with a chat_login oauth code • The twitch channel you want to connect to What you need to do: • Connect to the irc server "irc.twitch.tv" on port "6667" • Set the username and nickname to your twitch account in all lower case • Set the password to be your twitch oauth, E.g. "oauth:aiudhf89daghaakjhgda" • Once you are connected, to join a stream's channel, you need to join "#" + channel name in lowercase • Handle message received, you will get the twitch username in lowercase and the message • If you want to handle whispers, it's a whole lot more work If you need a hand, I've worked with twitch in Vb.NET and Java before, so just HMU with a PM. |