mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
Remove cached events
This commit is contained in:
@@ -22,14 +22,6 @@ class ClientDataManager {
|
||||
const already = this.client.guilds.has(data.id);
|
||||
const guild = new Guild(this.client, data);
|
||||
this.client.guilds.set(guild.id, guild);
|
||||
if (this.client.listenerCount(Constants.Events.GUILD_CACHED)) {
|
||||
/**
|
||||
* Emitted whenever a guild is added to the cache
|
||||
* @event Client#guildCached
|
||||
* @param {Guild} guild The cached guild
|
||||
*/
|
||||
this.client.emit(Constants.Events.GUILD_CACHED, guild);
|
||||
}
|
||||
if (this.pastReady && !already) {
|
||||
/**
|
||||
* Emitted whenever the client joins a guild.
|
||||
@@ -74,15 +66,6 @@ class ClientDataManager {
|
||||
}
|
||||
|
||||
if (channel) {
|
||||
if (this.client.listenerCount(Constants.Events.CHANNEL_CACHED)) {
|
||||
/**
|
||||
* Emitted whenever a channel is added to the cache
|
||||
* @event Client#channelCached
|
||||
* @param {Channel} channel The cached channel
|
||||
*/
|
||||
this.client.emit(Constants.Events.CHANNEL_CACHED, channel);
|
||||
}
|
||||
|
||||
if (this.pastReady && !already) this.client.emit(Constants.Events.CHANNEL_CREATE, channel);
|
||||
this.client.channels.set(channel.id, channel);
|
||||
return channel;
|
||||
|
||||
Reference in New Issue
Block a user