mirror of
https://github.com/danbulant/Shasha
synced 2026-06-14 11:51:18 +00:00
27 lines
No EOL
808 B
JavaScript
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");
|
|
});
|
|
}
|
|
}; |