mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
when fetch_all_members is enabled, new guilds should also do that (#623)
* when fetch_all_members is enabled, new guilds should also do that * Fix Gus' derp (#1) * Fix my derp (#2) * Fix another of Gus' derps (#3)
This commit is contained in:
committed by
Schuyler Cebulskie
parent
ab4707f9b4
commit
b9caa2ee5d
@@ -27,7 +27,11 @@ class ClientDataManager {
|
|||||||
* @event Client#guildCreate
|
* @event Client#guildCreate
|
||||||
* @param {Guild} guild The created guild
|
* @param {Guild} guild The created guild
|
||||||
*/
|
*/
|
||||||
this.client.emit(Constants.Events.GUILD_CREATE, guild);
|
if (this.client.options.fetch_all_members) {
|
||||||
|
guild.fetchMembers().then(() => { this.client.emit(Constants.Events.GUILD_CREATE, guild); });
|
||||||
|
} else {
|
||||||
|
this.client.emit(Constants.Events.GUILD_CREATE, guild);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return guild;
|
return guild;
|
||||||
|
|||||||
Reference in New Issue
Block a user