It “freezes” because it is waiting for a line to arrive. If the server isn’t sending anything at the moment, your bot will wait until the server has something to send again. Consider reading the messages asynchronously.
But the problem is that the bot recives messages at first then just stops even if im still chatting the bot wont recive any of it until i reconnect the bot.
I’m going to have to agree with this. You need to make your reading code in a separate thread if you want the program to accept input on the main thread.
i am not the greatest of programmers but your code should be along the lines of
while(true)
{
var message = await inputStream.ReadLine();
return message;
}
i am thinking the reason you only get the first line is because it only execute once. but you will need to async the method because it will lock up your UI.