mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 14:13:02 -04:00
show commit id
This commit is contained in:
parent
ef310b5f07
commit
95dffa5397
1 changed files with 4 additions and 2 deletions
|
@ -4,7 +4,8 @@ const Permissions = Constants.Permissions;
|
|||
const { createEmbed } = require('../../../labscore/utils/embed')
|
||||
const { editOrReply } = require('../../../labscore/utils/message')
|
||||
|
||||
const { execSync } = require("child_process")
|
||||
const { execSync } = require("child_process");
|
||||
const { highlight } = require("../../../labscore/utils/markdown");
|
||||
|
||||
module.exports = {
|
||||
name: "update",
|
||||
|
@ -25,7 +26,8 @@ module.exports = {
|
|||
try{
|
||||
const r = execSync("git pull")
|
||||
if(r.toString().includes("Already up to date.")) return await response.edit({embeds: [createEmbed("warning", context, "Already up to date.")]})
|
||||
return await response.edit({embeds: [createEmbed("success", context, "Update complete.")]})
|
||||
let id = r.toString().match(/(?:.*?)\.\.([a-z0-9]{7})/)[1]
|
||||
return await response.edit({embeds: [createEmbed("brand", context, {description: `Update complete (${highlight(id)})`})]})
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
return await response.edit({embeds: [createEmbed("error", context, "Update failed.")]})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue