mirror of
https://github.com/danbulant/discord.js
synced 2026-06-19 14:41:36 +00:00
Webpack build: c483dd8239
This commit is contained in:
parent
0aabf6e9aa
commit
9bb44cf0f8
2 changed files with 25 additions and 6 deletions
|
|
@ -260,6 +260,7 @@ exports.VoiceOPCodes = {
|
|||
|
||||
exports.Events = {
|
||||
READY: 'ready',
|
||||
GUILD_CACHED: 'guildCached',
|
||||
GUILD_CREATE: 'guildCreate',
|
||||
GUILD_DELETE: 'guildDelete',
|
||||
GUILD_UPDATE: 'guildUpdate',
|
||||
|
|
@ -279,6 +280,7 @@ exports.Events = {
|
|||
GUILD_EMOJI_UPDATE: 'guildEmojiUpdate',
|
||||
GUILD_BAN_ADD: 'guildBanAdd',
|
||||
GUILD_BAN_REMOVE: 'guildBanRemove',
|
||||
CHANNEL_CACHED: 'channelCached',
|
||||
CHANNEL_CREATE: 'channelCreate',
|
||||
CHANNEL_DELETE: 'channelDelete',
|
||||
CHANNEL_UPDATE: 'channelUpdate',
|
||||
|
|
@ -19176,6 +19178,14 @@ 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.
|
||||
|
|
@ -19220,6 +19230,15 @@ 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;
|
||||
|
|
|
|||
12
discord.indev.min.js
vendored
12
discord.indev.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue