From 863eac637588fa46154d473f9d057733fe3d342a Mon Sep 17 00:00:00 2001 From: benji7425 Date: Sun, 26 Nov 2017 23:35:51 +0000 Subject: [PATCH] Revert "Removed ignoring of certain debug message in debug.log" This reverts commit 1e4016ffd4d78d3a85c9161ab702b97979155753 in discord-bot-core subrepo --- discord-bot-core/Client.js | 6 ++++-- discord-bot-core/internal-config.json | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/discord-bot-core/Client.js b/discord-bot-core/Client.js index 0440f01..1710a51 100644 --- a/discord-bot-core/Client.js +++ b/discord-bot-core/Client.js @@ -62,7 +62,8 @@ module.exports = class Client extends Discord.Client { onDebug(info) { info = info.replace(/Authenticated using token [^ ]+/, "Authenticated using token [redacted]"); - CoreUtil.dateDebug(info); + if (!InternalConfig.debugIgnores.some(x => info.startsWith(x))) + CoreUtil.dateDebug(info); } onGuildCreate(guild) { @@ -92,7 +93,8 @@ module.exports = class Client extends Discord.Client { } /** - * @param {*} json + * @param {*} json + * @param {*} guildDataModel */ fromJSON(json) { const guildsData = Object.keys(json); diff --git a/discord-bot-core/internal-config.json b/discord-bot-core/internal-config.json index 5ae2d05..999879a 100644 --- a/discord-bot-core/internal-config.json +++ b/discord-bot-core/internal-config.json @@ -3,5 +3,9 @@ "website": "https://benji7425.github.io", "discordInvite": "https://discord.gg/SSkbwSJ", "defaultDMResponse": "This bot does not have any handling for direct messages. To learn more or get help please visit %s, or join my Discord server here: %s", - "reconnectTimeout": 5000 + "reconnectTimeout": 5000, + "debugIgnores":[ + "[ws] [connection] Sending a heartbeat", + "[ws] [connection] Heartbeat acknowledged" + ] } \ No newline at end of file