Shasha/cmds/owner/update.js
2021-07-26 15:30:59 +07:00

27 lines
No EOL
808 B
JavaScript

'use strict';
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) {
super(client, {
name: "update",
memberName: "update",
group: "owner",
description: "Update Shasha.",
ownerOnly: true,
guarded: true
});
}
async run(msg) {
exec("bash .update.sh", async (xe, o, e) => {
if (xe || e) {
await errLog(xe || e, msg, msg.client, true, "", true);
}
if (o) return trySend(msg.client, msg, o);
return trySend(msg.client, msg, "Done");
});
}
};