mrmBot-Matrix/commands/general/restart.js

18 lines
572 B
JavaScript
Raw Normal View History

import Command from "../../classes/command.js";
class RestartCommand extends Command {
async run() {
const owners = process.env.OWNER.split(",");
if (!owners.includes(this.message.author.id)) return "Only the bot owner can restart me!";
await this.client.createMessage(this.message.channel.id, Object.assign({
content: "esmBot is restarting."
}, this.reference));
2021-08-07 20:50:47 +00:00
this.ipc.restartAllClusters(true);
2021-07-05 04:15:27 +00:00
//this.ipc.broadcast("restart");
}
static description = "Restarts me";
static aliases = ["reboot"];
}
export default RestartCommand;