mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 14:13:02 -04:00
allow me to force update
This commit is contained in:
parent
987d1896ac
commit
bc4dedb51f
1 changed files with 5 additions and 2 deletions
|
@ -10,8 +10,11 @@ module.exports = {
|
||||||
description: 'update bot',
|
description: 'update bot',
|
||||||
examples: ['update'],
|
examples: ['update'],
|
||||||
category: 'dev',
|
category: 'dev',
|
||||||
usage: 'update'
|
usage: 'update [-force true]'
|
||||||
},
|
},
|
||||||
|
args: [
|
||||||
|
{ default: false, name: "force", type: "bool" }
|
||||||
|
],
|
||||||
onBefore: context => context.user.isClientOwner,
|
onBefore: context => context.user.isClientOwner,
|
||||||
onCancel: context =>
|
onCancel: context =>
|
||||||
context.reply(
|
context.reply(
|
||||||
|
@ -22,7 +25,7 @@ module.exports = {
|
||||||
let response = await editOrReply(context, createEmbed("loading", context, "Updating bot..."))
|
let response = await editOrReply(context, createEmbed("loading", context, "Updating bot..."))
|
||||||
try{
|
try{
|
||||||
const t = Date.now()
|
const t = Date.now()
|
||||||
|
if(args.force) execSync("git checkout .")
|
||||||
const r = 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.")]})
|
if(r.toString().includes("Already up to date.")) return await response.edit({embeds: [createEmbed("warning", context, "Already up to date.")]})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue