From c6316814eb6952a9634f7381407a30bddbb154f6 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Tue, 3 May 2022 14:26:19 +0700 Subject: [PATCH] fix --- package.json | 2 +- src/managers/ClientUserSettingManager.js | 8 +------- src/structures/Guild.js | 2 -- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 5a29aec..935f692 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord.js-selfbot-v13", - "version": "1.4.21", + "version": "1.4.22", "description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]", "main": "./src/index.js", "types": "./typings/index.d.ts", diff --git a/src/managers/ClientUserSettingManager.js b/src/managers/ClientUserSettingManager.js index 11c589c..ec67d48 100644 --- a/src/managers/ClientUserSettingManager.js +++ b/src/managers/ClientUserSettingManager.js @@ -149,13 +149,7 @@ class ClientUserSettingManager { this.guildMetadata = new Collection(data_); } if ('restricted_guilds' in data) { - data.restricted_guilds.map(guildId => { - const guild = this.client.guilds.cache.get(guildId); - if (!guild) return false; - guild.disableDM = true; - this.disableDMfromServer.set(guildId, true); - return true; - }); + this.disableDMfromServer = new Collection(data.restricted_guilds.map(guildId => [guildId, true])); } } async fetch() { diff --git a/src/structures/Guild.js b/src/structures/Guild.js index d508399..6bd535d 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -129,8 +129,6 @@ class Guild extends AnonymousGuild { * @type {number} */ this.shardId = data.shardId; - - this.disableDM = false; } /**