mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
rename deploy
This commit is contained in:
parent
1cb686cbc5
commit
4656e82336
1 changed files with 0 additions and 0 deletions
|
@ -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."))
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue