rename deploy

This commit is contained in:
bignutty 2024-08-08 22:33:25 +02:00
parent 1cb686cbc5
commit 4656e82336

View file

@ -1,29 +0,0 @@
const { createEmbed } = require('#utils/embed')
const { editOrReply } = require('#utils/message')
const { execSync } = require('child_process');
module.exports = {
name: "reboot",
label: "flags",
metadata: {
description: `Reboot the bot.`,
description_short: 'Reboot the bot.',
examples: ['reboot'],
category: 'dev',
usage: 'reboot'
},
onBefore: context => context.user.isClientOwner,
onCancel: () => { },
run: async (context) => {
try{
await editOrReply(context, createEmbed("loading", context, "Updating bot..."));
execSync("git pull");
await editOrReply(context, createEmbed("success", context, "Rebooting bot..."));
execSync("pm2 restart labscore-prd");
}catch(e){
console.log(e)
await editOrReply(context, createEmbed("error", context, "Unable to reboot."))
}
}
};