mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 04:52:22 +00: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:
parent
ab4707f9b4
commit
b9caa2ee5d
1 changed files with 5 additions and 1 deletions
|
|
@ -27,7 +27,11 @@ class ClientDataManager {
|
|||
* @event Client#guildCreate
|
||||
* @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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue