Add commit count to update command

This commit is contained in:
SileNce5k 2021-07-08 12:18:36 +02:00
parent 855daefa4d
commit a59d642d75
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -22,7 +22,8 @@ module.exports = {
cmd = `git log --oneline ${commits}`;
exec(cmd, (err, stdout, stderr) =>{
process.stdout.write(stdout)
msg.edit(`${sendText}\n\nLatest commits:\n${stdout}`)
let commitCount = stdout.split(/\r\n|\r|\n/).length
msg.edit(`${sendText}\n\nLatest commits (${commitCount}):\n${stdout}`)
if (err) console.log(stderr)
})
})