Comparing version 1.0.2 to 1.0.3
17
baily.js
@@ -10,6 +10,6 @@ #!/usr/bin/env node | ||
prompt.message = colors.blue("Baily:") | ||
prompt.message = '' | ||
function talk(){ | ||
prompt.get('talk', (err, text)=>{ | ||
prompt.get('You', (err, text)=>{ | ||
if(err || !text){ | ||
@@ -21,3 +21,3 @@ console.log('Bye!') | ||
data: { | ||
text: text.talk, | ||
text: text['You'], | ||
access_token: process.env['BAILY_ACCESS_TOKEN'] | ||
@@ -27,4 +27,6 @@ }, | ||
.then(response=>{ | ||
cli.ok(response.responseText) | ||
setTimeout(talk, 500) | ||
setTimeout(()=>{ | ||
console.log(colors.green("Baily:") + ' ' + response.responseText) | ||
talk() | ||
}, 500) | ||
}) | ||
@@ -43,6 +45,3 @@ .catch(error=>{ | ||
.then(response=>{ | ||
console.log(colors.blue("Baily:") + 'Welcome! You are now connected to Baily.') | ||
// return subshell('.', {BAILY_ACCESS_TOKEN: response.access_token}, (err,code)=>{ | ||
// cli.ok('Farewell young padawan.') | ||
// }) | ||
console.log(colors.green("Baily:") + ' Welcome! You are now connected to Baily.') | ||
return process.env['BAILY_ACCESS_TOKEN'] = response.access_token | ||
@@ -49,0 +48,0 @@ }) |
{ | ||
"name": "baily-cli", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "baily.js", |
4763
146