@evolvejs/core
Version:
An advanced Discord API wrapper with TS and JS support
20 lines (19 loc) • 669 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const __1 = require("../../..");
const GuildEvents_1 = require("../../Events/GuildEvents");
class default_1 {
constructor(client, payload, shard) {
const guild = payload.d;
if (client.guilds.has(guild.id)) {
return;
}
else {
const newGuild = new __1.Guild(guild, client);
if (client.options.enableGuildCache)
client.guilds.set(newGuild.id, newGuild);
client.emit(__1.EVENTS.GUILD_CREATE, new GuildEvents_1.GuildEvents(client, newGuild, shard));
}
}
}
exports.default = default_1;