Closed khhwang838 closed 7 years ago
Problem solved. I changed some code in newSocket(socket) function in ~/myBotname/server-telnet.js Modified part is below.
socket.write('You> ');
var message='';
socket.on('data', (data) => {
message = message.concat(data);
if ( data.includes("\n") ) {
receiveData(socket, bot, message);
message = '';
}
});
// Handle disconnects.
socket.on('end', () => {
closeSocket(socket, bot);
});
Hi, I'm new to superscript and I followed the installation instructions. And I could run superscript telnet server by running the command below But I cannot type a sentence to talk with a bot. It seems like it sends data by a character to server not by a word.
Expected Behavior
I was expecting to type a sentence on the client console.
Current Behavior
Client sends data character by character as soon as I type. Looks like this.
Hello ::1:57330! Type /quit to disconnect.
You> H Bot> You> H Bot> You> e Bot> You> l Bot> You> l Bot> You> o Bot> You> w Bot>
Possible Solution
Steps to Reproduce (for bugs)
Context
I am looking for some good open source chatbot project and trying to test each of them to find out their pros and cons.
Your Environment
I'm running superscript on Windows 10, cmd window, localhost.
npm, node versions are C:\Users\dev>npm --version 5.5.1 C:\Users\dev>node --version v8.9.0