This commit is contained in:
Erik 2023-05-03 23:16:02 +03:00
parent 33b1087671
commit 45b1f8c2df
Signed by: Navy.gif
GPG Key ID: 2532FBBB61C65A68
2 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@navy.gif/logger",
"version": "2.3.2",
"version": "2.3.3",
"description": "Logging thing",
"author": "Navy.gif",
"license": "MIT",

View File

@ -168,14 +168,16 @@ class MasterLogger implements Logger {
if (this.#_logLevelMapping[type] >= this.#_logLevel)
console.log(`${colour.func(type)}${spacer} ${colour.func(header)}: ${chalk.bold(subheader)}${text}`); // eslint-disable-line no-console
if ((broadcast || this.#_broadcastLevel <= this.#_logLevelMapping[type]) && this.#webhook)
if ((broadcast || this.#_broadcastLevel <= this.#_logLevelMapping[type]) && this.#webhook) {
const description = (subheader.length ? `**${subheader}**\n` : '') + `\`\`\`${text}\`\`\``;
this.#webhook.send({
embeds: [{
title: `[__${type.toUpperCase()}__] ${this._shard(shard)}`,
description: `**${subheader}**\n\`\`\`${text}\`\`\``,
description,
color: colour.int
}]
});
}
const streamType = this.#streamTypeMapping[type] || 'default';
if (this.#writeStreams[streamType])