mirror of
https://github.com/discordjs/discord.js.git
synced 2026-06-02 00:50:09 +00:00
refactor: make use of destructuring for Constants (#1942)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const Constants = require('../util/Constants');
|
||||
const { UserSettingsMap } = require('../util/Constants');
|
||||
const Util = require('../util/Util');
|
||||
const { Error } = require('../errors');
|
||||
|
||||
@@ -17,7 +17,7 @@ class ClientUserSettings {
|
||||
* @private
|
||||
*/
|
||||
patch(data) {
|
||||
for (const [key, value] of Object.entries(Constants.UserSettingsMap)) {
|
||||
for (const [key, value] of Object.entries(UserSettingsMap)) {
|
||||
if (!data.hasOwnProperty(key)) continue;
|
||||
if (typeof value === 'function') {
|
||||
this[value.name] = value(data[key]);
|
||||
|
||||
Reference in New Issue
Block a user