Edit message after update with last commit
This commit is contained in:
parent
85baa09942
commit
3e718e60ec
2 changed files with 11 additions and 2 deletions
|
@ -29,4 +29,4 @@ If you want this feature, you have to enable it in ./data/config.json.
|
||||||
|
|
||||||
## Known issues
|
## Known issues
|
||||||
|
|
||||||
* parseMention has issues sometimes
|
* parseMention has issues sometimes, but I don't know what exactly causes it and when it happens.
|
||||||
|
|
|
@ -16,7 +16,16 @@ module.exports = {
|
||||||
let beforeSize = client.commands.size;
|
let beforeSize = client.commands.size;
|
||||||
reloadCommands(client)
|
reloadCommands(client)
|
||||||
let sendText = `${stdout}\nBot updated, and\n${calculateReloaded(beforeSize, client)}`
|
let sendText = `${stdout}\nBot updated, and\n${calculateReloaded(beforeSize, client)}`
|
||||||
message.channel.send(sendText)
|
message.channel.send(sendText).then(function(msg){
|
||||||
|
cmd = "git log --oneline -n 1";
|
||||||
|
exec(cmd, (err, stdout, stderr) =>{
|
||||||
|
process.stdout.write(stdout)
|
||||||
|
msg.edit(`${sendText}\n\nNewest commit:\n${stdout.split(" ")[1]}`)
|
||||||
|
if (err) console.log(stderr)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (err) {
|
if (err) {
|
||||||
message.channel.send("Something went wrong...");
|
message.channel.send("Something went wrong...");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue