From 806c210ae93858ea972f26174b4f6af323ebe2e8 Mon Sep 17 00:00:00 2001 From: LucasB25 <50886682+LucasB25@users.noreply.github.com> Date: Sun, 11 Feb 2024 12:43:49 +0100 Subject: [PATCH] Update GuildDelete.ts Signed-off-by: LucasB25 <50886682+LucasB25@users.noreply.github.com> --- src/events/client/GuildDelete.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/events/client/GuildDelete.ts b/src/events/client/GuildDelete.ts index 6f27304a4..b5c668a99 100644 --- a/src/events/client/GuildDelete.ts +++ b/src/events/client/GuildDelete.ts @@ -24,12 +24,13 @@ export default class GuildDelete extends Event { } const embed = new EmbedBuilder() .setColor(this.client.config.color.red) - .setAuthor({ name: guild.name, iconURL: guild.iconURL({ extension: 'jpeg' }) }) + .setAuthor({ name: guild.name || 'Unknown Guild', iconURL: guild.iconURL({ extension: 'jpeg' }) }) + .setDescription(`**${guild.name}** has been removed from my guilds!`) .setThumbnail(guild.iconURL({ extension: 'jpeg' })) .addFields( { name: 'Owner', value: owner.user.tag, inline: true }, - { name: 'Members', value: guild.memberCount.toString(), inline: true }, + { name: 'Members', value: guild.memberCount ? guild.memberCount.toString() : 'Unknown', inline: true }, { name: 'Created At', value: ``,