From d0634a315f61b6ab227b270631b68069fdcf7910 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Fri, 1 May 2020 11:29:58 +0200 Subject: [PATCH] Fixed reserved word --- libs.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs.js b/libs.js index b25e13c..e8425a9 100644 --- a/libs.js +++ b/libs.js @@ -250,7 +250,7 @@ const formatMessage = (values) => { */ const publishMessage = (song, cover) => { const status = formatMessage(song) - const catch = (err, res) => { + const callback = (err, res) => { if ( err ) { console.log(config.colors.FgRed, 'ERR on publishMessage:', err, config.colors.Reset) } @@ -258,19 +258,19 @@ const publishMessage = (song, cover) => { if (cover) { getMedia(cover, (err, dest) => { if (err) { - M.post('statuses', { status }, catch) + M.post('statuses', { status }, callback) } else { M.post('media', { file: fs.createReadStream(dest) }).then(resp => { const id = resp.data.id - M.post('statuses', { status, media_ids: [id] }, catch) + M.post('statuses', { status, media_ids: [id] }, callback) }) .catch( () => { - M.post('statuses', { status }, catch) + M.post('statuses', { status }, callback) }) } }) } else { - M.post('statuses', { status }, catch) + M.post('statuses', { status }, callback) } }