Hello. Im creating my own chat bot for my channel. i have be able to successfully connect and join a channel. i can receive incoming messages in the channel i have joined but i cant seem to figure out how to send messages into the channel. i see that i need to add the PRIVMSG command but i dont ever get a response nor an error. can someone please clarify the format at which i need to send the message i wish to send to the channel or anything that might cause the problem?
PRIVMSG #lowercasechannelname :Your message goes here\r\n`
Your best reference would be the irc protocol. It specifies the format of the incoming and outgoing messages. Twitch implements part of IRCv3.
ill give this one more shot. i believe i tried this already.
ill give the protocols one more look over. ive been burred deep in them while writing my whole bot .
I tried this exact format and i couldn’t get it to work
here was my output out.print("PRIVMSG #<channel in lowercase> :test\r\n");
anyone else know how to get it to work?
Besides us not knowing the context of that code (for example, what is out
), you should probably, work through either a tutorial on IRC, or learn and use an IRC library
here is the code… its in java… out = new PrintWriter(socket.getOutputStream(), true);
the command that is sent is out.print("PRIVMSG #postitmonkey :test\r\n");
Have you tried out.println
instead of just print
?
damn that was it! i didnt think the line command would be the problem. Thank you! i was only using print not println
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.