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);