This commit is contained in:
Erik 2022-07-18 20:11:56 +03:00
parent 983c503088
commit fb0fe94ac2
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -291,6 +291,7 @@ class DiscordClient extends Client {
getGuildWrapper(id) { getGuildWrapper(id) {
if (this.guildWrappers.has(id)) return this.guildWrappers.get(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)); const wrapper = new GuildWrapper(this, this.guilds.cache.get(id));
this.guildWrappers.set(id, wrapper); this.guildWrappers.set(id, wrapper);