From e85c938683e5b58ec6c38ba7c3ca4e715a965e7b Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Fri, 3 Dec 2021 14:05:21 +0200 Subject: [PATCH] log line --- structure/Client.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/structure/Client.js b/structure/Client.js index 813d95b..11731a9 100644 --- a/structure/Client.js +++ b/structure/Client.js @@ -1,3 +1,4 @@ +const { inspect } = require('util'); const { Client } = require('discord.js'); // eslint-disable-next-line no-unused-vars @@ -127,9 +128,9 @@ class ModmailClient extends Client { if (!result) return; - if (result.error) return channel.send(result.msg).catch(err => this.logger.error(`Client.load errored at channel.send:\n${err.stack}`)); - else if (result.response) return channel.send(result.response).catch(err => this.logger.error(`Client.load errored at channel.send:\n${err.stack}`)); - else if (typeof result === 'string') return channel.send(result).catch(err => this.logger.error(`Client.load errored at channel.send:\n${err.stack}`)); + if (result.error) return channel.send(result.msg).catch(err => this.logger.error(`Client.load errored at channel.send:\n${err.stack}\n${inspect(result)}`)); + else if (result.response) return channel.send(result.response).catch(err => this.logger.error(`Client.load errored at channel.send:\n${err.stack}\n${inspect(result)}`)); + else if (typeof result === 'string') return channel.send(result).catch(err => this.logger.error(`Client.load errored at channel.send:\n${err.stack}\n${inspect(result)}`)); }