mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
ClientUserGuildSettings: avoid uncaught exception and a bit of refactoring (#1885)
* refactor(ClientUserGuildSettings): make client first parameter of the constructor * refactor(ClientUserChannelOverride): patch if possible rather then reinstantiating every update * fix(ClientUserGuildSettings): avoid uncaught exception when patching newly joined guilds/gdms
This commit is contained in:
@@ -84,7 +84,7 @@ class ClientUser extends User {
|
||||
this.guildSettings = new Collection();
|
||||
if (data.user_guild_settings) {
|
||||
for (const settings of data.user_guild_settings) {
|
||||
this.guildSettings.set(settings.guild_id, new ClientUserGuildSettings(settings, this.client));
|
||||
this.guildSettings.set(settings.guild_id, new ClientUserGuildSettings(this.client, settings));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user