mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
refactor: make use of destructuring for Constants (#1942)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const Constants = require('../util/Constants');
|
||||
const { UserChannelOverrideMap } = require('../util/Constants');
|
||||
|
||||
/**
|
||||
* A wrapper around the ClientUser's channel overrides.
|
||||
@@ -14,7 +14,7 @@ class ClientUserChannelOverride {
|
||||
* @private
|
||||
*/
|
||||
patch(data) {
|
||||
for (const [key, value] of Object.entries(Constants.UserChannelOverrideMap)) {
|
||||
for (const [key, value] of Object.entries(UserChannelOverrideMap)) {
|
||||
if (!data.hasOwnProperty(key)) continue;
|
||||
if (typeof value === 'function') {
|
||||
this[value.name] = value(data[key]);
|
||||
|
||||
Reference in New Issue
Block a user