Browse Source

little fix

ekardnam 4 years ago
parent
commit
eba7796c5b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      bot.js

+ 2 - 1
bot.js

@@ -111,7 +111,7 @@ let bot = {
       promise = promise.then(data => this.promisePost(pieces[i], data.id_str))
     }
 
-    return promise.then(() => console.log(`[INFO] Tweeted ${post}`))
+    return promise
       .catch(err => console.error(err))
   },
 
@@ -190,6 +190,7 @@ let bot = {
                 }).catch(err => { console.error(err) })
             } else {
               this.twitterPost(this.twitterFormat(status.content))
+              .then(() => console.log(`[INFO] Tweeted ${this.twitterFormat(status.content)}`))
             }
           })