From ef310b5f0797d3974e7ccfe0239dfd348f7577ad Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Fri, 17 Jun 2022 21:59:45 +0200 Subject: [PATCH] notice for already updated --- commands/message/dev/{pull.js => update.js} | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename commands/message/dev/{pull.js => update.js} (84%) diff --git a/commands/message/dev/pull.js b/commands/message/dev/update.js similarity index 84% rename from commands/message/dev/pull.js rename to commands/message/dev/update.js index 7c47377..eb6844b 100644 --- a/commands/message/dev/pull.js +++ b/commands/message/dev/update.js @@ -23,7 +23,8 @@ module.exports = { await context.triggerTyping(); let response = await editOrReply(context, createEmbed("loading", context, "Updating bot...")) try{ - execSync("git pull") + 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.")]}) }catch(e){ console.log(e)