Skip to content

Commit

Permalink
feat: comestic output improvements (#747)
Browse files Browse the repository at this point in the history
Better output.

Test: `huemul bin chile`
  • Loading branch information
juanbrujo authored Jun 19, 2024
1 parent cf6438a commit ea49234
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/bin-checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// None
//
// Commands:
// hubot bin help
// hubot bin <bankname>
//
// Author:
Expand Down Expand Up @@ -65,16 +66,16 @@ module.exports = function (robot) {
const cards = Array.from(cardsContainer).map(card => $(card).text().replace(/\n/g, ' ').trim())

if (cards.length) {
msg.send(`Encontramos ${cards.length}💳 para ${bankName}\n${cards}`)
msg.send(`Encontramos *${cards.length}* 💳 para *${bankName}*:\n${cards.join(',').replace(/,/g, '\n').split()}`)
} else {
msg.send(`No encontramos tarjetas para ${bankName}`)
msg.send(`No encontramos tarjetas para *${bankName}*`)
}
} else {
msg.send(':facepalm: Error: ', error)
}
})
} else {
msg.send('🏦 Banco no encontrado. Deja de inventar o haz un PR.')
msg.send('Banco 🏦 no encontrado. Deja de inventar o haz un PR.')
}
})
}

0 comments on commit ea49234

Please sign in to comment.