Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- process.stdin.resume()
- process.stdin.on('data', function(d){
- switch(d.toString().toLowerCase()) {
- case "start\n":
- console.log("DONT STOP ME NOW");
- break;
- case "stop\n":
- console.log("Stream stopped");
- break;
- case "restart\n":
- console.log("Stream restarted");
- break;
- case "help\n":
- console.log("Start: Empieza a stremear lo configurado en Stream.js y actualiza los copiers\n");
- console.log("Stop: Detiene el streaming en twitter\n");
- console.log("Restart: Reinicia el streaming de twitter, necesario si hemos anadido copiers\n");
- console.log("Tweet <whatever you want to tweet>: Tweet whatever you want\n");
- console.log("Clean: Unfollow people who doesnt follow you back\n");
- console.log("Follow: Follow X random people 2nd grade of communication (friend of a friend)\n");
- console.log("Add: Add a new copier (name and id needed)\n");
- break;
- default:
- var message = d.toString().toLowerCase();
- console.log(message);
- // if (message.slice(0,5) == "tweet"){
- // console.log("tweeted")
- // };
- if(message == "adder"){
- console.log("aqui estoy yo");
- }
- else{
- console.log("Comando introducido incorrecto, escribe help si necesitas ayuda.");
- console.log(d.toString().slice(0,4).toLowerCase());
- }
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement