From 29667c96e52a9f0b1e499fa6c21d9fe80e06bb37 Mon Sep 17 00:00:00 2001 From: Alessandro Impellizzeri Date: Tue, 12 Oct 2021 21:10:59 +0200 Subject: [PATCH] fix(Guild): guild.available is never set on new joins (#6769) --- src/structures/Guild.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 338729409079..b56ebf3436ec 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -137,7 +137,11 @@ class Guild extends AnonymousGuild { this.id = data.id; if ('name' in data) this.name = data.name; if ('icon' in data) this.icon = data.icon; - if ('unavailable' in data) this.available = !data.unavailable; + if ('unavailable' in data) { + this.available = !data.unavailable; + } else { + this.available ??= true; + } if ('discovery_splash' in data) { /**