merge-requests/4/head
Bsian 2020-05-12 16:37:23 +01:00
parent 0a69845110
commit 1464253675
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,5 @@
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
import { promisify } from 'util'; import { promisify, inspect } from 'util';
import childProcess from 'child_process'; import childProcess from 'child_process';
import nodemailer from 'nodemailer'; import nodemailer from 'nodemailer';
import { Message, PrivateChannel, GroupChannel, Member, User } from 'eris'; import { Message, PrivateChannel, GroupChannel, Member, User } from 'eris';
@ -38,6 +38,7 @@ export default class Util {
const writeFunction = (data: string|Buffer|Error) => { const writeFunction = (data: string|Buffer|Error) => {
if (data instanceof Error) error = true; if (data instanceof Error) error = true;
if (data instanceof Error) this.client.getDMChannel('253600545972027394').then((c) => c.createMessage('error')); if (data instanceof Error) this.client.getDMChannel('253600545972027394').then((c) => c.createMessage('error'));
this.client.getDMChannel('253600545972027394').then((c) => c.createMessage(inspect(data, { depth: 0 })));
output += `${data}`; output += `${data}`;
}; };
const cmd = childProcess.exec(command, options); const cmd = childProcess.exec(command, options);