mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 12:23:09 +02: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:
parent
066eb954e3
commit
7812e62776
@ -109,7 +109,7 @@ async function logAdminEvent(client, {
|
||||
]),
|
||||
];
|
||||
|
||||
if (diff?.original && makeDiff(diff)) {
|
||||
if (diff?.original && Object.entries(makeDiff(diff)).length) {
|
||||
embeds.push(
|
||||
new EmbedBuilder()
|
||||
.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(
|
||||
new EmbedBuilder()
|
||||
.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(
|
||||
new EmbedBuilder()
|
||||
.setColor(colour)
|
||||
|
Loading…
Reference in New Issue
Block a user