From fb0fe94ac27ae64f587f2736fa0d3945b98ef33e Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Mon, 18 Jul 2022 20:11:56 +0300 Subject: [PATCH] error --- src/structure/DiscordClient.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/structure/DiscordClient.js b/src/structure/DiscordClient.js index 8f27e7e..e89c735 100644 --- a/src/structure/DiscordClient.js +++ b/src/structure/DiscordClient.js @@ -291,6 +291,7 @@ class DiscordClient extends Client { getGuildWrapper(id) { if (this.guildWrappers.has(id)) return this.guildWrappers.get(id); + if (!this.guilds.cache.has(id)) throw new Error('Guild is not present on client'); const wrapper = new GuildWrapper(this, this.guilds.cache.get(id)); this.guildWrappers.set(id, wrapper);