This commit is contained in:
Neko-Life 2021-07-26 15:10:13 +07:00
parent 7fddd2d202
commit 8bd14b54fa

View file

@ -1,6 +1,8 @@
'use strict';
const commando = require("@iceprod/discord.js-commando");
const commando = require("@iceprod/discord.js-commando"),
{ exec } = require("child_process"),
{ errLog, trySend } = require("../../resources/functions");
module.exports = class update extends commando.Command {
constructor(client) {
@ -14,6 +16,12 @@ module.exports = class update extends commando.Command {
});
}
run(msg) {
return exec("bash ../../.update.sh", (xe, o, e) => {
if (xe || e) {
await errLog(xe || e, msg, msg.client, true, "", true);
return;
}
if (o) return trySend(msg.client, msg, o);
});
}
};