mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +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 { UserGuildSettingsMap } = require('../util/Constants');
|
||||
const Collection = require('../util/Collection');
|
||||
const ClientUserChannelOverride = require('./ClientUserChannelOverride');
|
||||
|
||||
@@ -29,7 +29,7 @@ class ClientUserGuildSettings {
|
||||
* @private
|
||||
*/
|
||||
patch(data) {
|
||||
for (const [key, value] of Object.entries(Constants.UserGuildSettingsMap)) {
|
||||
for (const [key, value] of Object.entries(UserGuildSettingsMap)) {
|
||||
if (!data.hasOwnProperty(key)) continue;
|
||||
if (key === 'channel_overrides') {
|
||||
for (const channel of data[key]) {
|
||||
|
||||
Reference in New Issue
Block a user