Make update show all commits since last update

This commit is contained in:
SileNce5k 2021-07-07 19:07:52 +02:00
parent a719ffbb4c
commit 456d3aae3c
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -17,12 +17,12 @@ module.exports = {
reloadCommands(client)
let sendText = `${stdout}\nBot updated, and\n${calculateReloaded(beforeSize, client)}`
message.channel.send(sendText).then(function(msg){
cmd = "git log --oneline -n 1";
let regex = /(.{0,7}\.\........)/
let commits = stdout.match(regex)[0]
cmd = `git log --oneline ${commits}`;
exec(cmd, (err, stdout, stderr) =>{
let regex = /.{0,7} /
let commitMsg = stdout.replace(regex, "")
process.stdout.write(stdout)
msg.edit(`${sendText}\n\nNewest commit:\n${commitMsg}`)
msg.edit(`${sendText}\n\nLatest commits:\n${stdout}`)
if (err) console.log(stderr)
})
})