From 2469183919f3e598507e2b3d4feb2e26e4b5d27d Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Fri, 20 Sep 2024 22:48:40 +0500 Subject: [PATCH] fallback image for join/leave logs --- events/Guild/guildCreate.js | 2 +- events/Guild/guildDelete.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/events/Guild/guildCreate.js b/events/Guild/guildCreate.js index 1981bfb2..3fa92589 100644 --- a/events/Guild/guildCreate.js +++ b/events/Guild/guildCreate.js @@ -48,7 +48,7 @@ class GuildCreate extends BaseEvent { const embed = client.embed({ author: { name: guild.name, - iconURL: guild.iconURL(), + iconURL: guild.iconURL() || client.user.avatarURL(), }, description: `Joined a new guild **${guild.name}**. It has **${users}** ${client.functions.getNoun(users, client.translate("misc:NOUNS:USERS:1"), client.translate("misc:NOUNS:USERS:2"), client.translate("misc:NOUNS:USERS:5"))} and **${bots}** ${client.functions.getNoun(bots, client.translate("misc:NOUNS:BOTS:1"), client.translate("misc:NOUNS:BOTS:2"), client.translate("misc:NOUNS:BOTS:5"))}`, }); diff --git a/events/Guild/guildDelete.js b/events/Guild/guildDelete.js index c6013f3e..15041b14 100644 --- a/events/Guild/guildDelete.js +++ b/events/Guild/guildDelete.js @@ -18,7 +18,7 @@ class GuildDelete extends BaseEvent { const embed = client.embed({ author: { name: guild.name, - iconURL: guild.iconURL(), + iconURL: guild.iconURL() || client.user.avatarURL(), }, description: `Left from guild **${guild.name}**.`, });