mirror of
https://github.com/danbulant/Shasha
synced 2026-06-19 06:11:26 +00:00
add .sh
This commit is contained in:
parent
7fddd2d202
commit
8bd14b54fa
1 changed files with 10 additions and 2 deletions
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue