diff --git a/commands/message/dev/update.js b/commands/message/dev/update.js index fe37bea..d48eb24 100644 --- a/commands/message/dev/update.js +++ b/commands/message/dev/update.js @@ -24,11 +24,13 @@ module.exports = { await context.triggerTyping(); let response = await editOrReply(context, createEmbed("loading", context, "Updating bot...")) try{ + const t = Date.now() + 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.")]}) let id = r.toString().match(/(?:.*?)\.\.([a-z0-9]{7})/)[1] - return await response.edit({embeds: [createEmbed("default", context, {description: `Update complete (${highlight(id)})`})]}) + return await response.edit({embeds: [createEmbed("success", context, `Updated to ${id} in ${((Date.now() - timings) / 1000).toFixed(2)}s`)]}) }catch(e){ console.log(e) return await response.edit({embeds: [createEmbed("error", context, "Update failed.")]}) diff --git a/labscore/utils/embed.js b/labscore/utils/embed.js index b5ecc5d..399ff4e 100644 --- a/labscore/utils/embed.js +++ b/labscore/utils/embed.js @@ -20,7 +20,7 @@ const embedTypes = Object.freeze({ "success": (context) => { return { author: { - name: `Error` + name: `Success` }, color: COLORS.success }