Fix update to show whole commit msg

This commit is contained in:
SileNce5k 2021-07-07 18:00:52 +02:00
parent 3e718e60ec
commit 0c1357903b
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -19,6 +19,8 @@ module.exports = {
message.channel.send(sendText).then(function(msg){
cmd = "git log --oneline -n 1";
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${stdout.split(" ")[1]}`)
if (err) console.log(stderr)