From 050335b760c994d9e9a06e656939f9b1f844dd59 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Wed, 1 Jul 2020 00:38:47 -0400 Subject: [PATCH] add systemd status cmd --- src/commands/exec.ts | 2 +- src/commands/systemd_status.ts | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 src/commands/systemd_status.ts diff --git a/src/commands/exec.ts b/src/commands/exec.ts index 40bc6d1..d224fe1 100644 --- a/src/commands/exec.ts +++ b/src/commands/exec.ts @@ -17,7 +17,7 @@ export default class Exec extends Command { try { if (!args.length) return this.client.commands.get('help').run(message, [this.name]); - const response = await this.loading(message.channel, `***Executing \`${args.join(' ')}\``); + const response = await this.loading(message.channel, `***Executing \`${args.join(' ')}\`***`); let result: string; try { result = await this.client.util.exec(args.join(' '), { cwd: '/opt/CloudServices' }); diff --git a/src/commands/systemd_status.ts b/src/commands/systemd_status.ts new file mode 100644 index 0000000..998457f --- /dev/null +++ b/src/commands/systemd_status.ts @@ -0,0 +1,31 @@ +import { Message } from 'eris'; +import { Client, Command, RichEmbed } from '../class'; + +export default class SystemD_Status extends Command { + constructor(client: Client) { + super(client); + this.name = 'status'; + this.description = 'Prints out the status of a SystemD service that you run.'; + this.usage = `${this.client.config.prefix}systemd status