mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
object.entries (#1549)
* Update DiscordAPIError.js * Update ClientUserSettings.js
This commit is contained in:
@@ -15,8 +15,7 @@ class ClientUserSettings {
|
||||
* @param {Object} data Data to patch this with
|
||||
*/
|
||||
patch(data) {
|
||||
for (const key of Object.keys(Constants.UserSettingsMap)) {
|
||||
const value = Constants.UserSettingsMap[key];
|
||||
for (const [key, value] of Object.entries(Constants.UserSettingsMap)) {
|
||||
if (!data.hasOwnProperty(key)) continue;
|
||||
if (typeof value === 'function') {
|
||||
this[value.name] = value(data[key]);
|
||||
|
||||
Reference in New Issue
Block a user