mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-03 00:41:27 +03:00
fix(logging): don't send empty changelogs
The previous fix didn't work because `{}` is true, not false as expected.
This commit is contained in:
@@ -109,7 +109,7 @@ async function logAdminEvent(client, {
|
|||||||
]),
|
]),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (diff?.original && makeDiff(diff)) {
|
if (diff?.original && Object.entries(makeDiff(diff)).length) {
|
||||||
embeds.push(
|
embeds.push(
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setColor(colour)
|
.setColor(colour)
|
||||||
@@ -171,7 +171,7 @@ async function logTicketEvent(client, {
|
|||||||
]),
|
]),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (diff?.original && makeDiff(diff)) {
|
if (diff?.original && Object.entries(makeDiff(diff)).length) {
|
||||||
embeds.push(
|
embeds.push(
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setColor(colour)
|
.setColor(colour)
|
||||||
@@ -223,7 +223,7 @@ async function logMessageEvent(client, {
|
|||||||
]),
|
]),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (diff?.original && makeDiff(diff)) {
|
if (diff?.original && Object.entries(makeDiff(diff)).length) {
|
||||||
embeds.push(
|
embeds.push(
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setColor(colour)
|
.setColor(colour)
|
||||||
|
Reference in New Issue
Block a user